From c5176c508996f8c2d521eaa32e99be88b8bb99db Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Thu, 26 Sep 2024 11:17:19 +0100 Subject: [PATCH 1/6] feat(structured outputs): add support for accessing raw responses --- src/openai/resources/beta/chat/completions.py | 246 +++++++++++++----- tests/lib/chat/test_completions.py | 177 ++++++++++++- 2 files changed, 355 insertions(+), 68 deletions(-) diff --git a/src/openai/resources/beta/chat/completions.py b/src/openai/resources/beta/chat/completions.py index ea3526778d..da6f189929 100644 --- a/src/openai/resources/beta/chat/completions.py +++ b/src/openai/resources/beta/chat/completions.py @@ -2,16 +2,21 @@ from __future__ import annotations -from typing import Dict, List, Union, Iterable, Optional +from typing import Dict, List, Type, Union, Iterable, Optional, cast from functools import partial from typing_extensions import Literal import httpx +from .... import _legacy_response from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._utils import maybe_transform, async_maybe_transform +from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ...._streaming import Stream from ....types.chat import completion_create_params +from ...._base_client import make_request_options from ....lib._parsing import ( ResponseFormatT, validate_input_tools as _validate_input_tools, @@ -20,6 +25,7 @@ ) from ....types.chat_model import ChatModel from ....lib.streaming.chat import ChatCompletionStreamManager, AsyncChatCompletionStreamManager +from ....types.chat.chat_completion import ChatCompletion from ....types.chat.chat_completion_chunk import ChatCompletionChunk from ....types.chat.parsed_chat_completion import ParsedChatCompletion from ....types.chat.chat_completion_tool_param import ChatCompletionToolParam @@ -31,6 +37,25 @@ class Completions(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CompletionsWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers + """ + return CompletionsWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CompletionsWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/openai/openai-python#with_streaming_response + """ + return CompletionsWithStreamingResponse(self) + def parse( self, *, @@ -113,39 +138,55 @@ class MathResponse(BaseModel): **(extra_headers or {}), } - raw_completion = self._client.chat.completions.create( - messages=messages, - model=model, - response_format=_type_to_response_format(response_format), - frequency_penalty=frequency_penalty, - function_call=function_call, - functions=functions, - logit_bias=logit_bias, - logprobs=logprobs, - max_completion_tokens=max_completion_tokens, - max_tokens=max_tokens, - n=n, - parallel_tool_calls=parallel_tool_calls, - presence_penalty=presence_penalty, - seed=seed, - service_tier=service_tier, - stop=stop, - stream_options=stream_options, - temperature=temperature, - tool_choice=tool_choice, - tools=tools, - top_logprobs=top_logprobs, - top_p=top_p, - user=user, - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - ) - return _parse_chat_completion( - response_format=response_format, - chat_completion=raw_completion, - input_tools=tools, + def parser(raw_completion: ChatCompletion) -> ParsedChatCompletion[ResponseFormatT]: + return _parse_chat_completion( + response_format=response_format, + chat_completion=raw_completion, + input_tools=tools, + ) + + return self._post( + "/chat/completions", + body=maybe_transform( + { + "messages": messages, + "model": model, + "frequency_penalty": frequency_penalty, + "function_call": function_call, + "functions": functions, + "logit_bias": logit_bias, + "logprobs": logprobs, + "max_completion_tokens": max_completion_tokens, + "max_tokens": max_tokens, + "n": n, + "parallel_tool_calls": parallel_tool_calls, + "presence_penalty": presence_penalty, + "response_format": _type_to_response_format(response_format), + "seed": seed, + "service_tier": service_tier, + "stop": stop, + "stream": False, + "stream_options": stream_options, + "temperature": temperature, + "tool_choice": tool_choice, + "tools": tools, + "top_logprobs": top_logprobs, + "top_p": top_p, + "user": user, + }, + completion_create_params.CompletionCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=parser, + ), + # we turn the `ChatCompletion` instance into a `ParsedChatCompletion` + # in the `parser` function above + cast_to=cast(Type[ParsedChatCompletion[ResponseFormatT]], ChatCompletion), + stream=False, ) def stream( @@ -247,6 +288,25 @@ def stream( class AsyncCompletions(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCompletionsWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers + """ + return AsyncCompletionsWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCompletionsWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/openai/openai-python#with_streaming_response + """ + return AsyncCompletionsWithStreamingResponse(self) + async def parse( self, *, @@ -329,39 +389,55 @@ class MathResponse(BaseModel): **(extra_headers or {}), } - raw_completion = await self._client.chat.completions.create( - messages=messages, - model=model, - response_format=_type_to_response_format(response_format), - frequency_penalty=frequency_penalty, - function_call=function_call, - functions=functions, - logit_bias=logit_bias, - logprobs=logprobs, - max_completion_tokens=max_completion_tokens, - max_tokens=max_tokens, - n=n, - parallel_tool_calls=parallel_tool_calls, - presence_penalty=presence_penalty, - seed=seed, - service_tier=service_tier, - stop=stop, - stream_options=stream_options, - temperature=temperature, - tool_choice=tool_choice, - tools=tools, - top_logprobs=top_logprobs, - top_p=top_p, - user=user, - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - ) - return _parse_chat_completion( - response_format=response_format, - chat_completion=raw_completion, - input_tools=tools, + def parser(raw_completion: ChatCompletion) -> ParsedChatCompletion[ResponseFormatT]: + return _parse_chat_completion( + response_format=response_format, + chat_completion=raw_completion, + input_tools=tools, + ) + + return await self._post( + "/chat/completions", + body=await async_maybe_transform( + { + "messages": messages, + "model": model, + "frequency_penalty": frequency_penalty, + "function_call": function_call, + "functions": functions, + "logit_bias": logit_bias, + "logprobs": logprobs, + "max_completion_tokens": max_completion_tokens, + "max_tokens": max_tokens, + "n": n, + "parallel_tool_calls": parallel_tool_calls, + "presence_penalty": presence_penalty, + "response_format": _type_to_response_format(response_format), + "seed": seed, + "service_tier": service_tier, + "stop": stop, + "stream": False, + "stream_options": stream_options, + "temperature": temperature, + "tool_choice": tool_choice, + "tools": tools, + "top_logprobs": top_logprobs, + "top_p": top_p, + "user": user, + }, + completion_create_params.CompletionCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=parser, + ), + # we turn the `ChatCompletion` instance into a `ParsedChatCompletion` + # in the `parser` function above + cast_to=cast(Type[ParsedChatCompletion[ResponseFormatT]], ChatCompletion), + stream=False, ) def stream( @@ -461,3 +537,39 @@ def stream( response_format=response_format, input_tools=tools, ) + + +class CompletionsWithRawResponse: + def __init__(self, completions: Completions) -> None: + self._completions = completions + + self.parse = _legacy_response.to_raw_response_wrapper( + completions.parse, + ) + + +class AsyncCompletionsWithRawResponse: + def __init__(self, completions: AsyncCompletions) -> None: + self._completions = completions + + self.parse = _legacy_response.async_to_raw_response_wrapper( + completions.parse, + ) + + +class CompletionsWithStreamingResponse: + def __init__(self, completions: Completions) -> None: + self._completions = completions + + self.parse = to_streamed_response_wrapper( + completions.parse, + ) + + +class AsyncCompletionsWithStreamingResponse: + def __init__(self, completions: AsyncCompletions) -> None: + self._completions = completions + + self.parse = async_to_streamed_response_wrapper( + completions.parse, + ) diff --git a/tests/lib/chat/test_completions.py b/tests/lib/chat/test_completions.py index d66630fa3a..16669c50d8 100644 --- a/tests/lib/chat/test_completions.py +++ b/tests/lib/chat/test_completions.py @@ -3,7 +3,7 @@ import os import json from enum import Enum -from typing import Any, List, Callable, Optional +from typing import Any, List, Callable, Optional, Awaitable from typing_extensions import Literal, TypeVar import httpx @@ -773,6 +773,139 @@ def test_parse_non_strict_tools(client: OpenAI) -> None: ) +@pytest.mark.respx(base_url=base_url) +def test_parse_pydantic_raw_response(client: OpenAI, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch) -> None: + class Location(BaseModel): + city: str + temperature: float + units: Literal["c", "f"] + + response = _make_snapshot_request( + lambda c: c.beta.chat.completions.with_raw_response.parse( + model="gpt-4o-2024-08-06", + messages=[ + { + "role": "user", + "content": "What's the weather like in SF?", + }, + ], + response_format=Location, + ), + content_snapshot=snapshot( + '{"id": "chatcmpl-ABe6gaYDCaT1qoLcITsBwOsvnpano", "object": "chat.completion", "created": 1727339142, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":63,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' + ), + mock_client=client, + respx_mock=respx_mock, + ) + assert response.http_request.headers.get("x-stainless-helper-method") == "beta.chat.completions.parse" + + completion = response.parse() + message = completion.choices[0].message + assert message.parsed is not None + assert isinstance(message.parsed.city, str) + assert print_obj(completion, monkeypatch) == snapshot( + """\ +ParsedChatCompletion[Location]( + choices=[ + ParsedChoice[Location]( + finish_reason='stop', + index=0, + logprobs=None, + message=ParsedChatCompletionMessage[Location]( + content='{"city":"San Francisco","temperature":63,"units":"f"}', + function_call=None, + parsed=Location(city='San Francisco', temperature=63.0, units='f'), + refusal=None, + role='assistant', + tool_calls=[] + ) + ) + ], + created=1727339142, + id='chatcmpl-ABe6gaYDCaT1qoLcITsBwOsvnpano', + model='gpt-4o-2024-08-06', + object='chat.completion', + service_tier=None, + system_fingerprint='fp_7568d46099', + usage=CompletionUsage( + completion_tokens=14, + completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), + prompt_tokens=79, + total_tokens=93 + ) +) +""" + ) + + +@pytest.mark.respx(base_url=base_url) +@pytest.mark.asyncio +async def test_async_parse_pydantic_raw_response( + async_client: AsyncOpenAI, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch +) -> None: + class Location(BaseModel): + city: str + temperature: float + units: Literal["c", "f"] + + response = await _make_async_snapshot_request( + lambda c: c.beta.chat.completions.with_raw_response.parse( + model="gpt-4o-2024-08-06", + messages=[ + { + "role": "user", + "content": "What's the weather like in SF?", + }, + ], + response_format=Location, + ), + content_snapshot=snapshot( + '{"id": "chatcmpl-ABflkTgswPsBFxJ9EG4ElhT5TVSPc", "object": "chat.completion", "created": 1727345532, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":64,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' + ), + mock_client=async_client, + respx_mock=respx_mock, + ) + assert response.http_request.headers.get("x-stainless-helper-method") == "beta.chat.completions.parse" + + completion = response.parse() + message = completion.choices[0].message + assert message.parsed is not None + assert isinstance(message.parsed.city, str) + assert print_obj(completion, monkeypatch) == snapshot( + """\ +ParsedChatCompletion[Location]( + choices=[ + ParsedChoice[Location]( + finish_reason='stop', + index=0, + logprobs=None, + message=ParsedChatCompletionMessage[Location]( + content='{"city":"San Francisco","temperature":64,"units":"f"}', + function_call=None, + parsed=Location(city='San Francisco', temperature=64.0, units='f'), + refusal=None, + role='assistant', + tool_calls=[] + ) + ) + ], + created=1727345532, + id='chatcmpl-ABflkTgswPsBFxJ9EG4ElhT5TVSPc', + model='gpt-4o-2024-08-06', + object='chat.completion', + service_tier=None, + system_fingerprint='fp_b40fb1c6fb', + usage=CompletionUsage( + completion_tokens=14, + completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), + prompt_tokens=79, + total_tokens=93 + ) +) +""" + ) + + @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) def test_parse_method_in_sync(sync: bool, client: OpenAI, async_client: AsyncOpenAI) -> None: checking_client: OpenAI | AsyncOpenAI = client if sync else async_client @@ -824,3 +957,45 @@ def _on_response(response: httpx.Response) -> None: client.close() return result + + +async def _make_async_snapshot_request( + func: Callable[[AsyncOpenAI], Awaitable[_T]], + *, + content_snapshot: Any, + respx_mock: MockRouter, + mock_client: AsyncOpenAI, +) -> _T: + live = os.environ.get("OPENAI_LIVE") == "1" + if live: + + async def _on_response(response: httpx.Response) -> None: + # update the content snapshot + assert json.dumps(json.loads(await response.aread())) == content_snapshot + + respx_mock.stop() + + client = AsyncOpenAI( + http_client=httpx.AsyncClient( + event_hooks={ + "response": [_on_response], + } + ) + ) + else: + respx_mock.post("/chat/completions").mock( + return_value=httpx.Response( + 200, + content=content_snapshot._old_value, + headers={"content-type": "application/json"}, + ) + ) + + client = mock_client + + result = await func(client) + + if live: + await client.close() + + return result From 1cbba60cec09cfbd13994a8a2ecb93327ed8273e Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Thu, 26 Sep 2024 11:48:02 +0100 Subject: [PATCH 2/6] fix snapshots --- ...7adb63fb6a8643672a1274b2890148e9090174.bin | 28 ++++ ...ac3d24cd4e18f92af3a1235d5b9da7f3fe6e52.bin | 100 +++++++++++++ ...27a6abb0e3fd23e60de0518ee6ebfc195b2168.bin | 22 +++ ...4effa1e9da604e94d375021ce7cae94f9f49eb.bin | 30 ++++ ...7ac0f54388b0fc552eb92c1e8985bc34607d92.bin | 70 +++++++++ ...ce2eb8de605bb30072435e34a68959effe393d.bin | 80 +++++++++++ ...5c1fa094246017075d8fb1186a055477a3be29.bin | 36 +++++ ...322fb95dcff30516f95f4ad016f5f1836b7119.bin | 10 ++ ...85c5821e0d63315b1b54b23bb3fcf620149dbb.bin | 52 +++++++ ...b48b59672e24d4b102c5eeadea08d85c96b055.bin | 32 +++++ ...57957355ac381f2d486a69ee753fd3ee827c24.bin | 12 ++ ...570a36059927703e01dc6ee746c6d04784ab5e.bin | 36 +++++ tests/lib/chat/test_completions.py | 128 ++++++++--------- tests/lib/chat/test_completions_streaming.py | 134 ++++++++---------- 14 files changed, 634 insertions(+), 136 deletions(-) create mode 100644 .inline-snapshot/external/04fbc4717b37193b9eddf2a3e27adb63fb6a8643672a1274b2890148e9090174.bin create mode 100644 .inline-snapshot/external/07fc6368a4715e29a6af42cc20ac3d24cd4e18f92af3a1235d5b9da7f3fe6e52.bin create mode 100644 .inline-snapshot/external/1f7bdb779714c94db3330faf1727a6abb0e3fd23e60de0518ee6ebfc195b2168.bin create mode 100644 .inline-snapshot/external/2672a71c779361b96a4fef9bfe4effa1e9da604e94d375021ce7cae94f9f49eb.bin create mode 100644 .inline-snapshot/external/3e005c33112c1aa98ffe09cf9f7ac0f54388b0fc552eb92c1e8985bc34607d92.bin create mode 100644 .inline-snapshot/external/56dbdd87d96d3242be6d742c3ece2eb8de605bb30072435e34a68959effe393d.bin create mode 100644 .inline-snapshot/external/78eb8762cd282036b1c330ec305c1fa094246017075d8fb1186a055477a3be29.bin create mode 100644 .inline-snapshot/external/7cb5136bff92f1d912465d8aca322fb95dcff30516f95f4ad016f5f1836b7119.bin create mode 100644 .inline-snapshot/external/80e47fe8b714fa686d61f0a89c85c5821e0d63315b1b54b23bb3fcf620149dbb.bin create mode 100644 .inline-snapshot/external/831699086ad4d3127654f81e52b48b59672e24d4b102c5eeadea08d85c96b055.bin create mode 100644 .inline-snapshot/external/c2bbcc5b189733e977f3230a9057957355ac381f2d486a69ee753fd3ee827c24.bin create mode 100644 .inline-snapshot/external/f9807613408bd263c8793c9b92570a36059927703e01dc6ee746c6d04784ab5e.bin diff --git a/.inline-snapshot/external/04fbc4717b37193b9eddf2a3e27adb63fb6a8643672a1274b2890148e9090174.bin b/.inline-snapshot/external/04fbc4717b37193b9eddf2a3e27adb63fb6a8643672a1274b2890148e9090174.bin new file mode 100644 index 0000000000..e6f8238aff --- /dev/null +++ b/.inline-snapshot/external/04fbc4717b37193b9eddf2a3e27adb63fb6a8643672a1274b2890148e9090174.bin @@ -0,0 +1,28 @@ +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_nZUB8dEnPSMykLtTKRRS3sT8","type":"function","function":{"name":"get_weather","arguments":""}}],"refusal":null},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"city"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"San"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" Francisco"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\",\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"state"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"CA"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}]} + +data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":48,"completion_tokens":19,"total_tokens":67,"completion_tokens_details":{"reasoning_tokens":0}}} + +data: [DONE] + diff --git a/.inline-snapshot/external/07fc6368a4715e29a6af42cc20ac3d24cd4e18f92af3a1235d5b9da7f3fe6e52.bin b/.inline-snapshot/external/07fc6368a4715e29a6af42cc20ac3d24cd4e18f92af3a1235d5b9da7f3fe6e52.bin new file mode 100644 index 0000000000..2a7bfcfb95 --- /dev/null +++ b/.inline-snapshot/external/07fc6368a4715e29a6af42cc20ac3d24cd4e18f92af3a1235d5b9da7f3fe6e52.bin @@ -0,0 +1,100 @@ +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"{\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"{\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"{\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"city"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"city"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"city"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"San"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"San"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"San"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\",\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"\",\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"\",\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"temperature"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"temperature"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"temperature"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"60"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":",\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"64"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":",\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"68"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":",\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"units"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"units"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"units"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"f"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"f"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"f"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\"}"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"\"}"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"\"}"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + +data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":79,"completion_tokens":42,"total_tokens":121,"completion_tokens_details":{"reasoning_tokens":0}}} + +data: [DONE] + diff --git a/.inline-snapshot/external/1f7bdb779714c94db3330faf1727a6abb0e3fd23e60de0518ee6ebfc195b2168.bin b/.inline-snapshot/external/1f7bdb779714c94db3330faf1727a6abb0e3fd23e60de0518ee6ebfc195b2168.bin new file mode 100644 index 0000000000..0d5363f24a --- /dev/null +++ b/.inline-snapshot/external/1f7bdb779714c94db3330faf1727a6abb0e3fd23e60de0518ee6ebfc195b2168.bin @@ -0,0 +1,22 @@ +data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_2NCpRQ3wEuK4kOH1budBUmZv","type":"function","function":{"name":"get_weather","arguments":""}}],"refusal":null},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"city"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"New"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" York"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" City"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}]} + +data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":44,"completion_tokens":16,"total_tokens":60,"completion_tokens_details":{"reasoning_tokens":0}}} + +data: [DONE] + diff --git a/.inline-snapshot/external/2672a71c779361b96a4fef9bfe4effa1e9da604e94d375021ce7cae94f9f49eb.bin b/.inline-snapshot/external/2672a71c779361b96a4fef9bfe4effa1e9da604e94d375021ce7cae94f9f49eb.bin new file mode 100644 index 0000000000..990f345797 --- /dev/null +++ b/.inline-snapshot/external/2672a71c779361b96a4fef9bfe4effa1e9da604e94d375021ce7cae94f9f49eb.bin @@ -0,0 +1,30 @@ +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":null,"refusal":""},"logprobs":{"content":null,"refusal":[]},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":"I'm"},"logprobs":{"content":null,"refusal":[{"token":"I'm","logprob":-0.0012038043,"bytes":[73,39,109],"top_logprobs":[]}]},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" very"},"logprobs":{"content":null,"refusal":[{"token":" very","logprob":-0.7845193,"bytes":[32,118,101,114,121],"top_logprobs":[]}]},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" sorry"},"logprobs":{"content":null,"refusal":[{"token":" sorry","logprob":-8.537869e-6,"bytes":[32,115,111,114,114,121],"top_logprobs":[]}]},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":","},"logprobs":{"content":null,"refusal":[{"token":",","logprob":-0.000030828953,"bytes":[44],"top_logprobs":[]}]},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" but"},"logprobs":{"content":null,"refusal":[{"token":" but","logprob":-0.029754885,"bytes":[32,98,117,116],"top_logprobs":[]}]},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" I"},"logprobs":{"content":null,"refusal":[{"token":" I","logprob":-0.0018191704,"bytes":[32,73],"top_logprobs":[]}]},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" can't"},"logprobs":{"content":null,"refusal":[{"token":" can't","logprob":-0.0114746485,"bytes":[32,99,97,110,39,116],"top_logprobs":[]}]},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" assist"},"logprobs":{"content":null,"refusal":[{"token":" assist","logprob":-0.0023167727,"bytes":[32,97,115,115,105,115,116],"top_logprobs":[]}]},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" with"},"logprobs":{"content":null,"refusal":[{"token":" with","logprob":-0.0052390876,"bytes":[32,119,105,116,104],"top_logprobs":[]}]},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" that"},"logprobs":{"content":null,"refusal":[{"token":" that","logprob":-0.0016676846,"bytes":[32,116,104,97,116],"top_logprobs":[]}]},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":"."},"logprobs":{"content":null,"refusal":[{"token":".","logprob":-0.63433325,"bytes":[46],"top_logprobs":[]}]},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + +data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":79,"completion_tokens":12,"total_tokens":91,"completion_tokens_details":{"reasoning_tokens":0}}} + +data: [DONE] + diff --git a/.inline-snapshot/external/3e005c33112c1aa98ffe09cf9f7ac0f54388b0fc552eb92c1e8985bc34607d92.bin b/.inline-snapshot/external/3e005c33112c1aa98ffe09cf9f7ac0f54388b0fc552eb92c1e8985bc34607d92.bin new file mode 100644 index 0000000000..7a4eb5a420 --- /dev/null +++ b/.inline-snapshot/external/3e005c33112c1aa98ffe09cf9f7ac0f54388b0fc552eb92c1e8985bc34607d92.bin @@ -0,0 +1,70 @@ +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"I'm"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" unable"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" provide"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" real"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" updates"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" For"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" most"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" San"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" I"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" recommend"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" checking"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" reliable"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" website"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" using"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" app"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + +data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":14,"completion_tokens":31,"total_tokens":45,"completion_tokens_details":{"reasoning_tokens":0}}} + +data: [DONE] + diff --git a/.inline-snapshot/external/56dbdd87d96d3242be6d742c3ece2eb8de605bb30072435e34a68959effe393d.bin b/.inline-snapshot/external/56dbdd87d96d3242be6d742c3ece2eb8de605bb30072435e34a68959effe393d.bin new file mode 100644 index 0000000000..59c7adf6e1 --- /dev/null +++ b/.inline-snapshot/external/56dbdd87d96d3242be6d742c3ece2eb8de605bb30072435e34a68959effe393d.bin @@ -0,0 +1,80 @@ +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"{\n"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" \""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"error"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" \""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"I'm"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" unable"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" provide"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" real"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" Please"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" check"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" website"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" app"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" conditions"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" San"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":".\"\n"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"}"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + +data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":19,"completion_tokens":36,"total_tokens":55,"completion_tokens_details":{"reasoning_tokens":0}}} + +data: [DONE] + diff --git a/.inline-snapshot/external/78eb8762cd282036b1c330ec305c1fa094246017075d8fb1186a055477a3be29.bin b/.inline-snapshot/external/78eb8762cd282036b1c330ec305c1fa094246017075d8fb1186a055477a3be29.bin new file mode 100644 index 0000000000..e689d0b523 --- /dev/null +++ b/.inline-snapshot/external/78eb8762cd282036b1c330ec305c1fa094246017075d8fb1186a055477a3be29.bin @@ -0,0 +1,36 @@ +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_GaxOHx7TMW5ozlqDe64MlazG","type":"function","function":{"name":"GetWeatherArgs","arguments":""}}],"refusal":null},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"city"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Ed"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"inburgh"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\",\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"country"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"UK"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\",\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"units"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"c"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}]} + +data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[],"usage":{"prompt_tokens":76,"completion_tokens":24,"total_tokens":100,"completion_tokens_details":{"reasoning_tokens":0}}} + +data: [DONE] + diff --git a/.inline-snapshot/external/7cb5136bff92f1d912465d8aca322fb95dcff30516f95f4ad016f5f1836b7119.bin b/.inline-snapshot/external/7cb5136bff92f1d912465d8aca322fb95dcff30516f95f4ad016f5f1836b7119.bin new file mode 100644 index 0000000000..a0f683ebbe --- /dev/null +++ b/.inline-snapshot/external/7cb5136bff92f1d912465d8aca322fb95dcff30516f95f4ad016f5f1836b7119.bin @@ -0,0 +1,10 @@ +data: {"id":"chatcmpl-ABgJ6fY83DkQIprIS0OUEJuQikPwJ","object":"chat.completion.chunk","created":1727347600,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_7568d46099","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ6fY83DkQIprIS0OUEJuQikPwJ","object":"chat.completion.chunk","created":1727347600,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_7568d46099","choices":[{"index":0,"delta":{"content":"{\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ6fY83DkQIprIS0OUEJuQikPwJ","object":"chat.completion.chunk","created":1727347600,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_7568d46099","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"length"}]} + +data: {"id":"chatcmpl-ABgJ6fY83DkQIprIS0OUEJuQikPwJ","object":"chat.completion.chunk","created":1727347600,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_7568d46099","choices":[],"usage":{"prompt_tokens":79,"completion_tokens":1,"total_tokens":80,"completion_tokens_details":{"reasoning_tokens":0}}} + +data: [DONE] + diff --git a/.inline-snapshot/external/80e47fe8b714fa686d61f0a89c85c5821e0d63315b1b54b23bb3fcf620149dbb.bin b/.inline-snapshot/external/80e47fe8b714fa686d61f0a89c85c5821e0d63315b1b54b23bb3fcf620149dbb.bin new file mode 100644 index 0000000000..0f4f3b1b80 --- /dev/null +++ b/.inline-snapshot/external/80e47fe8b714fa686d61f0a89c85c5821e0d63315b1b54b23bb3fcf620149dbb.bin @@ -0,0 +1,52 @@ +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_DUIfURCaEhuke5aUHUG9drKQ","type":"function","function":{"name":"GetWeatherArgs","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"ci"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ty\": "}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"Edinb"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"urgh"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\", \"c"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ountry"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\": \""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"UK\", "}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"units"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\": \""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"c\"}"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_bxtBSMiFZj9tpEEoR2HvbYAV","type":"function","function":{"name":"get_stock_price","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"ti"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"cker\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":": \"AAP"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"L\", "}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"\"exch"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ange\":"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":" \"NA"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"SDAQ\""}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}]} + +data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[],"usage":{"prompt_tokens":149,"completion_tokens":60,"total_tokens":209,"completion_tokens_details":{"reasoning_tokens":0}}} + +data: [DONE] + diff --git a/.inline-snapshot/external/831699086ad4d3127654f81e52b48b59672e24d4b102c5eeadea08d85c96b055.bin b/.inline-snapshot/external/831699086ad4d3127654f81e52b48b59672e24d4b102c5eeadea08d85c96b055.bin new file mode 100644 index 0000000000..355dd754c1 --- /dev/null +++ b/.inline-snapshot/external/831699086ad4d3127654f81e52b48b59672e24d4b102c5eeadea08d85c96b055.bin @@ -0,0 +1,32 @@ +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":null,"refusal":""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":"I'm"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" very"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" sorry"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":","},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" but"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" I"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" can't"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" assist"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" with"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" that"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" request"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":"."},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + +data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":79,"completion_tokens":13,"total_tokens":92,"completion_tokens_details":{"reasoning_tokens":0}}} + +data: [DONE] + diff --git a/.inline-snapshot/external/c2bbcc5b189733e977f3230a9057957355ac381f2d486a69ee753fd3ee827c24.bin b/.inline-snapshot/external/c2bbcc5b189733e977f3230a9057957355ac381f2d486a69ee753fd3ee827c24.bin new file mode 100644 index 0000000000..114635e963 --- /dev/null +++ b/.inline-snapshot/external/c2bbcc5b189733e977f3230a9057957355ac381f2d486a69ee753fd3ee827c24.bin @@ -0,0 +1,12 @@ +data: {"id":"chatcmpl-ABgJ8cHXA6KgIqzM4i65GWmSOmpGc","object":"chat.completion.chunk","created":1727347602,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":{"content":[],"refusal":null},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ8cHXA6KgIqzM4i65GWmSOmpGc","object":"chat.completion.chunk","created":1727347602,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"Foo"},"logprobs":{"content":[{"token":"Foo","logprob":-0.00867213,"bytes":[70,111,111],"top_logprobs":[]}],"refusal":null},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ8cHXA6KgIqzM4i65GWmSOmpGc","object":"chat.completion.chunk","created":1727347602,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"!"},"logprobs":{"content":[{"token":"!","logprob":-0.19675663,"bytes":[33],"top_logprobs":[]}],"refusal":null},"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ8cHXA6KgIqzM4i65GWmSOmpGc","object":"chat.completion.chunk","created":1727347602,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + +data: {"id":"chatcmpl-ABgJ8cHXA6KgIqzM4i65GWmSOmpGc","object":"chat.completion.chunk","created":1727347602,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":9,"completion_tokens":2,"total_tokens":11,"completion_tokens_details":{"reasoning_tokens":0}}} + +data: [DONE] + diff --git a/.inline-snapshot/external/f9807613408bd263c8793c9b92570a36059927703e01dc6ee746c6d04784ab5e.bin b/.inline-snapshot/external/f9807613408bd263c8793c9b92570a36059927703e01dc6ee746c6d04784ab5e.bin new file mode 100644 index 0000000000..d1753b3ae4 --- /dev/null +++ b/.inline-snapshot/external/f9807613408bd263c8793c9b92570a36059927703e01dc6ee746c6d04784ab5e.bin @@ -0,0 +1,36 @@ +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"{\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"city"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"San"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\",\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"temperature"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"64"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":",\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"units"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"f"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\"}"},"logprobs":null,"finish_reason":null}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + +data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":79,"completion_tokens":14,"total_tokens":93,"completion_tokens_details":{"reasoning_tokens":0}}} + +data: [DONE] + diff --git a/tests/lib/chat/test_completions.py b/tests/lib/chat/test_completions.py index 16669c50d8..2588b12698 100644 --- a/tests/lib/chat/test_completions.py +++ b/tests/lib/chat/test_completions.py @@ -43,7 +43,7 @@ def test_parse_nothing(client: OpenAI, respx_mock: MockRouter, monkeypatch: pyte ], ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABfvaueLEMLNYbT8YzpJxsmiQ6HSY", "object": "chat.completion", "created": 1727346142, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "I\'m unable to provide real-time weather updates. To get the current weather in San Francisco, I recommend checking a reliable weather website or app like the Weather Channel or a local news station.", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 14, "completion_tokens": 37, "total_tokens": 51, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' + '{"id": "chatcmpl-ABgIZhG0R51R94epwHjt5bgb83rz4", "object": "chat.completion", "created": 1727347567, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "I\'m sorry, but I can\'t provide real-time weather updates. To find out the current weather in San Francisco, I recommend checking a reliable weather website or app.", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 14, "completion_tokens": 32, "total_tokens": 46, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' ), mock_client=client, respx_mock=respx_mock, @@ -58,8 +58,8 @@ def test_parse_nothing(client: OpenAI, respx_mock: MockRouter, monkeypatch: pyte index=0, logprobs=None, message=ParsedChatCompletionMessage[NoneType]( - content="I'm unable to provide real-time weather updates. To get the current weather in San Francisco, I -recommend checking a reliable weather website or app like the Weather Channel or a local news station.", + content="I'm sorry, but I can't provide real-time weather updates. To find out the current weather in +San Francisco, I recommend checking a reliable weather website or app.", function_call=None, parsed=None, refusal=None, @@ -68,17 +68,17 @@ def test_parse_nothing(client: OpenAI, respx_mock: MockRouter, monkeypatch: pyte ) ) ], - created=1727346142, - id='chatcmpl-ABfvaueLEMLNYbT8YzpJxsmiQ6HSY', + created=1727347567, + id='chatcmpl-ABgIZhG0R51R94epwHjt5bgb83rz4', model='gpt-4o-2024-08-06', object='chat.completion', service_tier=None, - system_fingerprint='fp_b40fb1c6fb', + system_fingerprint='fp_7568d46099', usage=CompletionUsage( - completion_tokens=37, + completion_tokens=32, completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), prompt_tokens=14, - total_tokens=51 + total_tokens=46 ) ) """ @@ -104,7 +104,7 @@ class Location(BaseModel): response_format=Location, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABfvbtVnTu5DeC4EFnRYj8mtfOM99", "object": "chat.completion", "created": 1727346143, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":65,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' + '{"id": "chatcmpl-ABgIaJhdAmzfDy7q3HCmK8jLHpja9", "object": "chat.completion", "created": 1727347568, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":68,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' ), mock_client=client, respx_mock=respx_mock, @@ -119,21 +119,21 @@ class Location(BaseModel): index=0, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":65,"units":"f"}', + content='{"city":"San Francisco","temperature":68,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=65.0, units='f'), + parsed=Location(city='San Francisco', temperature=68.0, units='f'), refusal=None, role='assistant', tool_calls=[] ) ) ], - created=1727346143, - id='chatcmpl-ABfvbtVnTu5DeC4EFnRYj8mtfOM99', + created=1727347568, + id='chatcmpl-ABgIaJhdAmzfDy7q3HCmK8jLHpja9', model='gpt-4o-2024-08-06', object='chat.completion', service_tier=None, - system_fingerprint='fp_5050236cbd', + system_fingerprint='fp_7568d46099', usage=CompletionUsage( completion_tokens=14, completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), @@ -166,7 +166,7 @@ class Location(BaseModel): response_format=Location, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABfvcC8grKYsRkSoMp9CCAhbXAd0b", "object": "chat.completion", "created": 1727346144, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":65,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 88, "completion_tokens": 14, "total_tokens": 102, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' + '{"id": "chatcmpl-ABgIg6AynR6shXkfPUb2F0PQFA7f8", "object": "chat.completion", "created": 1727347574, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":68,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 88, "completion_tokens": 14, "total_tokens": 102, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' ), mock_client=client, respx_mock=respx_mock, @@ -181,17 +181,17 @@ class Location(BaseModel): index=0, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":65,"units":"f"}', + content='{"city":"San Francisco","temperature":68,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=65.0, units='f'), + parsed=Location(city='San Francisco', temperature=68.0, units='f'), refusal=None, role='assistant', tool_calls=[] ) ) ], - created=1727346144, - id='chatcmpl-ABfvcC8grKYsRkSoMp9CCAhbXAd0b', + created=1727347574, + id='chatcmpl-ABgIg6AynR6shXkfPUb2F0PQFA7f8', model='gpt-4o-2024-08-06', object='chat.completion', service_tier=None, @@ -232,7 +232,7 @@ class ColorDetection(BaseModel): response_format=ColorDetection, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABfvjIatz0zrZu50gRbMtlp0asZpz", "object": "chat.completion", "created": 1727346151, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"color\\":\\"red\\",\\"hex_color_code\\":\\"#FF0000\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 109, "completion_tokens": 14, "total_tokens": 123, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' + '{"id": "chatcmpl-ABgIhcpfJ6iawoLkZbJ7JDuTunZiy", "object": "chat.completion", "created": 1727347575, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"color\\":\\"red\\",\\"hex_color_code\\":\\"#FF0000\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 109, "completion_tokens": 14, "total_tokens": 123, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' ), mock_client=client, respx_mock=respx_mock, @@ -279,7 +279,7 @@ class Location(BaseModel): response_format=Location, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABfvp8qzboW92q8ONDF4DPHlI7ckC", "object": "chat.completion", "created": 1727346157, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":64,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}, {"index": 1, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":65,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}, {"index": 2, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":63.0,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 44, "total_tokens": 123, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' + '{"id": "chatcmpl-ABgIht4RFnH9kv9s0zCqfRfVr2wjX", "object": "chat.completion", "created": 1727347575, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":59,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}, {"index": 1, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":68,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}, {"index": 2, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":67,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 42, "total_tokens": 121, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' ), mock_client=client, respx_mock=respx_mock, @@ -293,9 +293,9 @@ class Location(BaseModel): index=0, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":64,"units":"f"}', + content='{"city":"San Francisco","temperature":59,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=64.0, units='f'), + parsed=Location(city='San Francisco', temperature=59.0, units='f'), refusal=None, role='assistant', tool_calls=[] @@ -306,9 +306,9 @@ class Location(BaseModel): index=1, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":65,"units":"f"}', + content='{"city":"San Francisco","temperature":68,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=65.0, units='f'), + parsed=Location(city='San Francisco', temperature=68.0, units='f'), refusal=None, role='assistant', tool_calls=[] @@ -319,9 +319,9 @@ class Location(BaseModel): index=2, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":63.0,"units":"f"}', + content='{"city":"San Francisco","temperature":67,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=63.0, units='f'), + parsed=Location(city='San Francisco', temperature=67.0, units='f'), refusal=None, role='assistant', tool_calls=[] @@ -353,7 +353,7 @@ class CalendarEvent: response_format=CalendarEvent, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABfvqhz4uUUWsw8Ohw2Mp9B4sKKV8", "object": "chat.completion", "created": 1727346158, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"name\\":\\"Science Fair\\",\\"date\\":\\"Friday\\",\\"participants\\":[\\"Alice\\",\\"Bob\\"]}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 92, "completion_tokens": 17, "total_tokens": 109, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' + '{"id": "chatcmpl-ABgIiIO7LjsAsuZIzMtIdqzlCzSB4", "object": "chat.completion", "created": 1727347576, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"name\\":\\"Science Fair\\",\\"date\\":\\"Friday\\",\\"participants\\":[\\"Alice\\",\\"Bob\\"]}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 92, "completion_tokens": 17, "total_tokens": 109, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' ), mock_client=client, respx_mock=respx_mock, @@ -377,12 +377,12 @@ class CalendarEvent: ) ) ], - created=1727346158, - id='chatcmpl-ABfvqhz4uUUWsw8Ohw2Mp9B4sKKV8', + created=1727347576, + id='chatcmpl-ABgIiIO7LjsAsuZIzMtIdqzlCzSB4', model='gpt-4o-2024-08-06', object='chat.completion', service_tier=None, - system_fingerprint='fp_7568d46099', + system_fingerprint='fp_b40fb1c6fb', usage=CompletionUsage( completion_tokens=17, completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), @@ -409,7 +409,7 @@ def test_pydantic_tool_model_all_types(client: OpenAI, respx_mock: MockRouter, m response_format=Query, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABfvtNiaTNUF6OymZUnEFc9lPq9p1", "object": "chat.completion", "created": 1727346161, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_NKpApJybW1MzOjZO2FzwYw0d", "type": "function", "function": {"name": "Query", "arguments": "{\\"name\\":\\"May 2022 Fulfilled Orders Not Delivered on Time\\",\\"table_name\\":\\"orders\\",\\"columns\\":[\\"id\\",\\"status\\",\\"expected_delivery_date\\",\\"delivered_at\\",\\"shipped_at\\",\\"ordered_at\\",\\"canceled_at\\"],\\"conditions\\":[{\\"column\\":\\"ordered_at\\",\\"operator\\":\\">=\\",\\"value\\":\\"2022-05-01\\"},{\\"column\\":\\"ordered_at\\",\\"operator\\":\\"<=\\",\\"value\\":\\"2022-05-31\\"},{\\"column\\":\\"status\\",\\"operator\\":\\"=\\",\\"value\\":\\"fulfilled\\"},{\\"column\\":\\"delivered_at\\",\\"operator\\":\\">\\",\\"value\\":{\\"column_name\\":\\"expected_delivery_date\\"}}],\\"order_by\\":\\"asc\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 512, "completion_tokens": 132, "total_tokens": 644, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' + '{"id": "chatcmpl-ABgIkOf7oA8OBGlO7YohLZHiKHJmJ", "object": "chat.completion", "created": 1727347578, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_c8rJvUlGYId0FlVyVNvrWI3q", "type": "function", "function": {"name": "Query", "arguments": "{\\"name\\":\\"FulfilledButLateOrders\\",\\"table_name\\":\\"orders\\",\\"columns\\":[\\"id\\",\\"status\\",\\"expected_delivery_date\\",\\"delivered_at\\",\\"shipped_at\\",\\"ordered_at\\"],\\"conditions\\":[{\\"column\\":\\"ordered_at\\",\\"operator\\":\\">=\\",\\"value\\":\\"2022-05-01\\"},{\\"column\\":\\"ordered_at\\",\\"operator\\":\\"<\\",\\"value\\":\\"2022-06-01\\"},{\\"column\\":\\"status\\",\\"operator\\":\\"=\\",\\"value\\":\\"fulfilled\\"},{\\"column\\":\\"delivered_at\\",\\"operator\\":\\">\\",\\"value\\":{\\"column_name\\":\\"expected_delivery_date\\"}}],\\"order_by\\":\\"asc\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 512, "completion_tokens": 121, "total_tokens": 633, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_143bb8492c"}' ), mock_client=client, respx_mock=respx_mock, @@ -430,11 +430,10 @@ def test_pydantic_tool_model_all_types(client: OpenAI, respx_mock: MockRouter, m tool_calls=[ ParsedFunctionToolCall( function=ParsedFunction( - arguments='{"name":"May 2022 Fulfilled Orders Not Delivered on -Time","table_name":"orders","columns":["id","status","expected_delivery_date","delivered_at","shipped_at","ordered_at"," -canceled_at"],"conditions":[{"column":"ordered_at","operator":">=","value":"2022-05-01"},{"column":"ordered_at","operato -r":"<=","value":"2022-05-31"},{"column":"status","operator":"=","value":"fulfilled"},{"column":"delivered_at","operator" -:">","value":{"column_name":"expected_delivery_date"}}],"order_by":"asc"}', + arguments='{"name":"FulfilledButLateOrders","table_name":"orders","columns":["id","status","expected +_delivery_date","delivered_at","shipped_at","ordered_at"],"conditions":[{"column":"ordered_at","operator":">=","value":" +2022-05-01"},{"column":"ordered_at","operator":"<","value":"2022-06-01"},{"column":"status","operator":"=","value":"fulf +illed"},{"column":"delivered_at","operator":">","value":{"column_name":"expected_delivery_date"}}],"order_by":"asc"}', name='Query', parsed_arguments=Query( columns=[ @@ -443,12 +442,11 @@ def test_pydantic_tool_model_all_types(client: OpenAI, respx_mock: MockRouter, m , , , - , - + ], conditions=[ Condition(column='ordered_at', operator=='>, value='2022-05-01'), - Condition(column='ordered_at', operator=, value='2022-06-01'), Condition(column='status', operator=, table_name= ) ), - id='call_NKpApJybW1MzOjZO2FzwYw0d', + id='call_c8rJvUlGYId0FlVyVNvrWI3q', type='function' ) ] @@ -492,7 +490,7 @@ class Location(BaseModel): response_format=Location, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABfvvX7eB1KsfeZj8VcF3z7G7SbaA", "object": "chat.completion", "created": 1727346163, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"", "refusal": null}, "logprobs": null, "finish_reason": "length"}], "usage": {"prompt_tokens": 79, "completion_tokens": 1, "total_tokens": 80, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' + '{"id": "chatcmpl-ABgIqaylwQNDVZAHe5lDKk0Ax7YS7", "object": "chat.completion", "created": 1727347584, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"", "refusal": null}, "logprobs": null, "finish_reason": "length"}], "usage": {"prompt_tokens": 79, "completion_tokens": 1, "total_tokens": 80, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' ), mock_client=client, respx_mock=respx_mock, @@ -518,7 +516,7 @@ class Location(BaseModel): response_format=Location, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABfvwoKVWPQj2UPlAcAKM7s40GsRx", "object": "chat.completion", "created": 1727346164, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "refusal": "I\'m very sorry, but I can\'t assist with that."}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 12, "total_tokens": 91, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' + '{"id": "chatcmpl-ABgIq8R3DWxhOWoorrE8RgxJTPkYS", "object": "chat.completion", "created": 1727347584, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "refusal": "I\'m sorry, but I can\'t assist with that request."}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 12, "total_tokens": 91, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' ), mock_client=client, respx_mock=respx_mock, @@ -535,7 +533,7 @@ class Location(BaseModel): content=None, function_call=None, parsed=None, - refusal="I'm very sorry, but I can't assist with that.", + refusal="I'm sorry, but I can't assist with that request.", role='assistant', tool_calls=[] ) @@ -566,7 +564,7 @@ class GetWeatherArgs(BaseModel): ], ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABfvx6Z4dchiW2nya1N8KMsHFrQRE", "object": "chat.completion", "created": 1727346165, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_Y6qJ7ofLgOrBnMD5WbVAeiRV", "type": "function", "function": {"name": "GetWeatherArgs", "arguments": "{\\"city\\":\\"Edinburgh\\",\\"country\\":\\"UK\\",\\"units\\":\\"c\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 76, "completion_tokens": 24, "total_tokens": 100, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_e45dabd248"}' + '{"id": "chatcmpl-ABgIrdZCy0ozC9KtEz7S1ZnTOSCjg", "object": "chat.completion", "created": 1727347585, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_XTnBuYWrgBj4X6EAx18u2DMx", "type": "function", "function": {"name": "GetWeatherArgs", "arguments": "{\\"city\\":\\"Edinburgh\\",\\"country\\":\\"United Kingdom\\",\\"units\\":\\"c\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 76, "completion_tokens": 25, "total_tokens": 101, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' ), mock_client=client, respx_mock=respx_mock, @@ -588,11 +586,11 @@ class GetWeatherArgs(BaseModel): tool_calls=[ ParsedFunctionToolCall( function=ParsedFunction( - arguments='{"city":"Edinburgh","country":"UK","units":"c"}', + arguments='{"city":"Edinburgh","country":"United Kingdom","units":"c"}', name='GetWeatherArgs', - parsed_arguments=GetWeatherArgs(city='Edinburgh', country='UK', units='c') + parsed_arguments=GetWeatherArgs(city='Edinburgh', country='United Kingdom', units='c') ), - id='call_Y6qJ7ofLgOrBnMD5WbVAeiRV', + id='call_XTnBuYWrgBj4X6EAx18u2DMx', type='function' ) ] @@ -637,7 +635,7 @@ class GetStockPrice(BaseModel): ], ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABfvyvfNWKcl7Ohqos4UFrmMs1v4C", "object": "chat.completion", "created": 1727346166, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_fdNz3vOBKYgOIpMdWotB9MjY", "type": "function", "function": {"name": "GetWeatherArgs", "arguments": "{\\"city\\": \\"Edinburgh\\", \\"country\\": \\"GB\\", \\"units\\": \\"c\\"}"}}, {"id": "call_h1DWI1POMJLb0KwIyQHWXD4p", "type": "function", "function": {"name": "get_stock_price", "arguments": "{\\"ticker\\": \\"AAPL\\", \\"exchange\\": \\"NASDAQ\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 149, "completion_tokens": 60, "total_tokens": 209, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' + '{"id": "chatcmpl-ABgIyhXFTmHutycKlMLZwNDlB9R8B", "object": "chat.completion", "created": 1727347592, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_XcVkrO33vBQCOhx224TKi4NW", "type": "function", "function": {"name": "GetWeatherArgs", "arguments": "{\\"city\\": \\"Edinburgh\\", \\"country\\": \\"UK\\", \\"units\\": \\"c\\"}"}}, {"id": "call_bf4aX8l8QAARQPdaE6HOpzG0", "type": "function", "function": {"name": "get_stock_price", "arguments": "{\\"ticker\\": \\"AAPL\\", \\"exchange\\": \\"NASDAQ\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 149, "completion_tokens": 60, "total_tokens": 209, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' ), mock_client=client, respx_mock=respx_mock, @@ -659,11 +657,11 @@ class GetStockPrice(BaseModel): tool_calls=[ ParsedFunctionToolCall( function=ParsedFunction( - arguments='{"city": "Edinburgh", "country": "GB", "units": "c"}', + arguments='{"city": "Edinburgh", "country": "UK", "units": "c"}', name='GetWeatherArgs', - parsed_arguments=GetWeatherArgs(city='Edinburgh', country='GB', units='c') + parsed_arguments=GetWeatherArgs(city='Edinburgh', country='UK', units='c') ), - id='call_fdNz3vOBKYgOIpMdWotB9MjY', + id='call_XcVkrO33vBQCOhx224TKi4NW', type='function' ), ParsedFunctionToolCall( @@ -672,7 +670,7 @@ class GetStockPrice(BaseModel): name='get_stock_price', parsed_arguments=GetStockPrice(exchange='NASDAQ', ticker='AAPL') ), - id='call_h1DWI1POMJLb0KwIyQHWXD4p', + id='call_bf4aX8l8QAARQPdaE6HOpzG0', type='function' ) ] @@ -717,7 +715,7 @@ def test_parse_strict_tools(client: OpenAI, respx_mock: MockRouter, monkeypatch: ], ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABfvzdvCI6RaIkiEFNjqGXCSYnlzf", "object": "chat.completion", "created": 1727346167, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_CUdUoJpsWWVdxXntucvnol1M", "type": "function", "function": {"name": "get_weather", "arguments": "{\\"city\\":\\"San Francisco\\",\\"state\\":\\"CA\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 48, "completion_tokens": 19, "total_tokens": 67, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' + '{"id": "chatcmpl-ABgIzSBJWifrpLSLto62LgecRNEVy", "object": "chat.completion", "created": 1727347593, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_KDRFFW5ivLsEC3mxFJH8jpfA", "type": "function", "function": {"name": "get_weather", "arguments": "{\\"city\\":\\"San Francisco\\",\\"state\\":\\"CA\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 48, "completion_tokens": 19, "total_tokens": 67, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' ), mock_client=client, respx_mock=respx_mock, @@ -743,7 +741,7 @@ def test_parse_strict_tools(client: OpenAI, respx_mock: MockRouter, monkeypatch: name='get_weather', parsed_arguments={'city': 'San Francisco', 'state': 'CA'} ), - id='call_CUdUoJpsWWVdxXntucvnol1M', + id='call_KDRFFW5ivLsEC3mxFJH8jpfA', type='function' ) ] @@ -792,7 +790,7 @@ class Location(BaseModel): response_format=Location, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABe6gaYDCaT1qoLcITsBwOsvnpano", "object": "chat.completion", "created": 1727339142, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":63,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' + '{"id": "chatcmpl-ABgJ0eZEWD1qADq9WVMnR9UbKDWya", "object": "chat.completion", "created": 1727347594, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":63,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' ), mock_client=client, respx_mock=respx_mock, @@ -821,8 +819,8 @@ class Location(BaseModel): ) ) ], - created=1727339142, - id='chatcmpl-ABe6gaYDCaT1qoLcITsBwOsvnpano', + created=1727347594, + id='chatcmpl-ABgJ0eZEWD1qADq9WVMnR9UbKDWya', model='gpt-4o-2024-08-06', object='chat.completion', service_tier=None, @@ -860,7 +858,7 @@ class Location(BaseModel): response_format=Location, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABflkTgswPsBFxJ9EG4ElhT5TVSPc", "object": "chat.completion", "created": 1727345532, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":64,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' + '{"id": "chatcmpl-ABgJ3taZMsRGuUqeKOrm9k6Koja9q", "object": "chat.completion", "created": 1727347597, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":14,\\"units\\":\\"c\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' ), mock_client=async_client, respx_mock=respx_mock, @@ -880,21 +878,21 @@ class Location(BaseModel): index=0, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":64,"units":"f"}', + content='{"city":"San Francisco","temperature":14,"units":"c"}', function_call=None, - parsed=Location(city='San Francisco', temperature=64.0, units='f'), + parsed=Location(city='San Francisco', temperature=14.0, units='c'), refusal=None, role='assistant', tool_calls=[] ) ) ], - created=1727345532, - id='chatcmpl-ABflkTgswPsBFxJ9EG4ElhT5TVSPc', + created=1727347597, + id='chatcmpl-ABgJ3taZMsRGuUqeKOrm9k6Koja9q', model='gpt-4o-2024-08-06', object='chat.completion', service_tier=None, - system_fingerprint='fp_b40fb1c6fb', + system_fingerprint='fp_5050236cbd', usage=CompletionUsage( completion_tokens=14, completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), diff --git a/tests/lib/chat/test_completions_streaming.py b/tests/lib/chat/test_completions_streaming.py index ce402cd158..2db9a47f5d 100644 --- a/tests/lib/chat/test_completions_streaming.py +++ b/tests/lib/chat/test_completions_streaming.py @@ -48,7 +48,7 @@ def test_parse_nothing(client: OpenAI, respx_mock: MockRouter, monkeypatch: pyte }, ], ), - content_snapshot=snapshot(external("e2aad469b71d*.bin")), + content_snapshot=snapshot(external("3e005c33112c*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -61,8 +61,8 @@ def test_parse_nothing(client: OpenAI, respx_mock: MockRouter, monkeypatch: pyte index=0, logprobs=None, message=ParsedChatCompletionMessage[NoneType]( - content="I'm unable to provide real-time weather updates. To get the current weather in San Francisco, I -recommend checking a reliable weather website or a weather app.", + content="I'm unable to provide real-time weather updates. For the most current weather in San Francisco, I +recommend checking a reliable weather website or using a weather app.", function_call=None, parsed=None, refusal=None, @@ -76,8 +76,8 @@ def test_parse_nothing(client: OpenAI, respx_mock: MockRouter, monkeypatch: pyte assert print_obj(listener.get_event_by_type("content.done"), monkeypatch) == snapshot( """\ ContentDoneEvent[NoneType]( - content="I'm unable to provide real-time weather updates. To get the current weather in San Francisco, I recommend -checking a reliable weather website or a weather app.", + content="I'm unable to provide real-time weather updates. For the most current weather in San Francisco, I recommend +checking a reliable weather website or using a weather app.", parsed=None, type='content.done' ) @@ -109,7 +109,7 @@ def on_event(stream: ChatCompletionStream[Location], event: ChatCompletionStream ], response_format=Location, ), - content_snapshot=snapshot(external("7e5ea4d12e7c*.bin")), + content_snapshot=snapshot(external("f9807613408b*.bin")), mock_client=client, respx_mock=respx_mock, on_event=on_event, @@ -138,17 +138,17 @@ def on_event(stream: ChatCompletionStream[Location], event: ChatCompletionStream index=0, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":61,"units":"f"}', + content='{"city":"San Francisco","temperature":64,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=61.0, units='f'), + parsed=Location(city='San Francisco', temperature=64.0, units='f'), refusal=None, role='assistant', tool_calls=[] ) ) ], - created=1727346169, - id='chatcmpl-ABfw1e5abtU8OwGr15vOreYVb2MiF', + created=1727347599, + id='chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0', model='gpt-4o-2024-08-06', object='chat.completion', service_tier=None, @@ -165,8 +165,8 @@ def on_event(stream: ChatCompletionStream[Location], event: ChatCompletionStream assert print_obj(listener.get_event_by_type("content.done"), monkeypatch) == snapshot( """\ ContentDoneEvent[Location]( - content='{"city":"San Francisco","temperature":61,"units":"f"}', - parsed=Location(city='San Francisco', temperature=61.0, units='f'), + content='{"city":"San Francisco","temperature":64,"units":"f"}', + parsed=Location(city='San Francisco', temperature=64.0, units='f'), type='content.done' ) """ @@ -194,7 +194,7 @@ class Location(BaseModel): n=3, response_format=Location, ), - content_snapshot=snapshot(external("a491adda08c3*.bin")), + content_snapshot=snapshot(external("07fc6368a471*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -308,9 +308,9 @@ class Location(BaseModel): index=0, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":65,"units":"f"}', + content='{"city":"San Francisco","temperature":60,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=65.0, units='f'), + parsed=Location(city='San Francisco', temperature=60.0, units='f'), refusal=None, role='assistant', tool_calls=[] @@ -321,9 +321,9 @@ class Location(BaseModel): index=1, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":61,"units":"f"}', + content='{"city":"San Francisco","temperature":64,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=61.0, units='f'), + parsed=Location(city='San Francisco', temperature=64.0, units='f'), refusal=None, role='assistant', tool_calls=[] @@ -334,9 +334,9 @@ class Location(BaseModel): index=2, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":59,"units":"f"}', + content='{"city":"San Francisco","temperature":68,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=59.0, units='f'), + parsed=Location(city='San Francisco', temperature=68.0, units='f'), refusal=None, role='assistant', tool_calls=[] @@ -367,7 +367,7 @@ class Location(BaseModel): max_tokens=1, response_format=Location, ), - content_snapshot=snapshot(external("4cc50a6135d2*.bin")), + content_snapshot=snapshot(external("7cb5136bff92*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -391,13 +391,13 @@ class Location(BaseModel): ], response_format=Location, ), - content_snapshot=snapshot(external("173417d55340*.bin")), + content_snapshot=snapshot(external("831699086ad4*.bin")), mock_client=client, respx_mock=respx_mock, ) assert print_obj(listener.get_event_by_type("refusal.done"), monkeypatch) == snapshot("""\ -RefusalDoneEvent(refusal="I'm sorry, I can't assist with that request.", type='refusal.done') +RefusalDoneEvent(refusal="I'm very sorry, but I can't assist with that request.", type='refusal.done') """) assert print_obj(listener.stream.get_final_completion().choices, monkeypatch) == snapshot( @@ -411,7 +411,7 @@ class Location(BaseModel): content=None, function_call=None, parsed=None, - refusal="I'm sorry, I can't assist with that request.", + refusal="I'm very sorry, but I can't assist with that request.", role='assistant', tool_calls=[] ) @@ -434,7 +434,7 @@ def test_content_logprobs_events(client: OpenAI, respx_mock: MockRouter, monkeyp ], logprobs=True, ), - content_snapshot=snapshot(external("83b060bae42e*.bin")), + content_snapshot=snapshot(external("c2bbcc5b1897*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -442,26 +442,22 @@ def test_content_logprobs_events(client: OpenAI, respx_mock: MockRouter, monkeyp assert print_obj([e for e in listener.events if e.type.startswith("logprobs")], monkeypatch) == snapshot("""\ [ LogprobsContentDeltaEvent( - content=[ - ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.0025094282, token='Foo', top_logprobs=[]) - ], - snapshot=[ - ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.0025094282, token='Foo', top_logprobs=[]) - ], + content=[ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.00867213, token='Foo', top_logprobs=[])], + snapshot=[ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.00867213, token='Foo', top_logprobs=[])], type='logprobs.content.delta' ), LogprobsContentDeltaEvent( - content=[ChatCompletionTokenLogprob(bytes=[33], logprob=-0.26638845, token='!', top_logprobs=[])], + content=[ChatCompletionTokenLogprob(bytes=[33], logprob=-0.19675663, token='!', top_logprobs=[])], snapshot=[ - ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.0025094282, token='Foo', top_logprobs=[]), - ChatCompletionTokenLogprob(bytes=[33], logprob=-0.26638845, token='!', top_logprobs=[]) + ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.00867213, token='Foo', top_logprobs=[]), + ChatCompletionTokenLogprob(bytes=[33], logprob=-0.19675663, token='!', top_logprobs=[]) ], type='logprobs.content.delta' ), LogprobsContentDoneEvent( content=[ - ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.0025094282, token='Foo', top_logprobs=[]), - ChatCompletionTokenLogprob(bytes=[33], logprob=-0.26638845, token='!', top_logprobs=[]) + ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.00867213, token='Foo', top_logprobs=[]), + ChatCompletionTokenLogprob(bytes=[33], logprob=-0.19675663, token='!', top_logprobs=[]) ], type='logprobs.content.done' ) @@ -475,8 +471,8 @@ def test_content_logprobs_events(client: OpenAI, respx_mock: MockRouter, monkeyp index=0, logprobs=ChoiceLogprobs( content=[ - ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.0025094282, token='Foo', top_logprobs=[]), - ChatCompletionTokenLogprob(bytes=[33], logprob=-0.26638845, token='!', top_logprobs=[]) + ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.00867213, token='Foo', top_logprobs=[]), + ChatCompletionTokenLogprob(bytes=[33], logprob=-0.19675663, token='!', top_logprobs=[]) ], refusal=None ), @@ -512,7 +508,7 @@ class Location(BaseModel): logprobs=True, response_format=Location, ), - content_snapshot=snapshot(external("569c877e6942*.bin")), + content_snapshot=snapshot(external("2672a71c7793*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -545,49 +541,49 @@ class Location(BaseModel): ChatCompletionTokenLogprob(bytes=[73, 39, 109], logprob=-0.0012038043, token="I'm", top_logprobs=[]), ChatCompletionTokenLogprob( bytes=[32, 118, 101, 114, 121], - logprob=-0.8438816, + logprob=-0.7845193, token=' very', top_logprobs=[] ), ChatCompletionTokenLogprob( bytes=[32, 115, 111, 114, 114, 121], - logprob=-3.4121115e-06, + logprob=-8.537869e-06, token=' sorry', top_logprobs=[] ), - ChatCompletionTokenLogprob(bytes=[44], logprob=-3.3809047e-05, token=',', top_logprobs=[]), + ChatCompletionTokenLogprob(bytes=[44], logprob=-3.0828953e-05, token=',', top_logprobs=[]), ChatCompletionTokenLogprob( bytes=[32, 98, 117, 116], - logprob=-0.038048144, + logprob=-0.029754885, token=' but', top_logprobs=[] ), - ChatCompletionTokenLogprob(bytes=[32, 73], logprob=-0.0016109125, token=' I', top_logprobs=[]), + ChatCompletionTokenLogprob(bytes=[32, 73], logprob=-0.0018191704, token=' I', top_logprobs=[]), ChatCompletionTokenLogprob( bytes=[32, 99, 97, 110, 39, 116], - logprob=-0.0073532974, + logprob=-0.0114746485, token=" can't", top_logprobs=[] ), ChatCompletionTokenLogprob( bytes=[32, 97, 115, 115, 105, 115, 116], - logprob=-0.0020837625, + logprob=-0.0023167727, token=' assist', top_logprobs=[] ), ChatCompletionTokenLogprob( bytes=[32, 119, 105, 116, 104], - logprob=-0.00318354, + logprob=-0.0052390876, token=' with', top_logprobs=[] ), ChatCompletionTokenLogprob( bytes=[32, 116, 104, 97, 116], - logprob=-0.0017186158, + logprob=-0.0016676846, token=' that', top_logprobs=[] ), - ChatCompletionTokenLogprob(bytes=[46], logprob=-0.57687104, token='.', top_logprobs=[]) + ChatCompletionTokenLogprob(bytes=[46], logprob=-0.63433325, token='.', top_logprobs=[]) ] ), message=ParsedChatCompletionMessage[Location]( @@ -623,7 +619,7 @@ class GetWeatherArgs(BaseModel): openai.pydantic_function_tool(GetWeatherArgs), ], ), - content_snapshot=snapshot(external("c6aa7e397b71*.bin")), + content_snapshot=snapshot(external("78eb8762cd28*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -648,7 +644,7 @@ class GetWeatherArgs(BaseModel): name='GetWeatherArgs', parsed_arguments=GetWeatherArgs(city='Edinburgh', country='UK', units='c') ), - id='call_c91SqDXlYFuETYv8mUHzz6pp', + id='call_GaxOHx7TMW5ozlqDe64MlazG', index=0, type='function' ) @@ -679,7 +675,7 @@ class GetWeatherArgs(BaseModel): name='GetWeatherArgs', parsed_arguments=GetWeatherArgs(city='Edinburgh', country='UK', units='c') ), - id='call_c91SqDXlYFuETYv8mUHzz6pp', + id='call_GaxOHx7TMW5ozlqDe64MlazG', index=0, type='function' ) @@ -724,7 +720,7 @@ class GetStockPrice(BaseModel): ), ], ), - content_snapshot=snapshot(external("f82268f2fefd*.bin")), + content_snapshot=snapshot(external("80e47fe8b714*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -745,11 +741,11 @@ class GetStockPrice(BaseModel): tool_calls=[ ParsedFunctionToolCall( function=ParsedFunction( - arguments='{"city": "Edinburgh", "country": "GB", "units": "c"}', + arguments='{"city": "Edinburgh", "country": "UK", "units": "c"}', name='GetWeatherArgs', - parsed_arguments=GetWeatherArgs(city='Edinburgh', country='GB', units='c') + parsed_arguments=GetWeatherArgs(city='Edinburgh', country='UK', units='c') ), - id='call_JMW1whyEaYG438VE1OIflxA2', + id='call_DUIfURCaEhuke5aUHUG9drKQ', index=0, type='function' ), @@ -759,7 +755,7 @@ class GetStockPrice(BaseModel): name='get_stock_price', parsed_arguments=GetStockPrice(exchange='NASDAQ', ticker='AAPL') ), - id='call_DNYTawLBoN8fj3KN6qU9N1Ou', + id='call_bxtBSMiFZj9tpEEoR2HvbYAV', index=1, type='function' ) @@ -775,11 +771,11 @@ class GetStockPrice(BaseModel): [ ParsedFunctionToolCall( function=ParsedFunction( - arguments='{"city": "Edinburgh", "country": "GB", "units": "c"}', + arguments='{"city": "Edinburgh", "country": "UK", "units": "c"}', name='GetWeatherArgs', - parsed_arguments=GetWeatherArgs(city='Edinburgh', country='GB', units='c') + parsed_arguments=GetWeatherArgs(city='Edinburgh', country='UK', units='c') ), - id='call_JMW1whyEaYG438VE1OIflxA2', + id='call_DUIfURCaEhuke5aUHUG9drKQ', index=0, type='function' ), @@ -789,7 +785,7 @@ class GetStockPrice(BaseModel): name='get_stock_price', parsed_arguments=GetStockPrice(exchange='NASDAQ', ticker='AAPL') ), - id='call_DNYTawLBoN8fj3KN6qU9N1Ou', + id='call_bxtBSMiFZj9tpEEoR2HvbYAV', index=1, type='function' ) @@ -831,7 +827,7 @@ def test_parse_strict_tools(client: OpenAI, respx_mock: MockRouter, monkeypatch: } ], ), - content_snapshot=snapshot(external("a247c49c5fcd*.bin")), + content_snapshot=snapshot(external("04fbc4717b37*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -856,7 +852,7 @@ def test_parse_strict_tools(client: OpenAI, respx_mock: MockRouter, monkeypatch: name='get_weather', parsed_arguments={'city': 'San Francisco', 'state': 'CA'} ), - id='call_CTf1nWJLqSeRgDqaCG27xZ74', + id='call_nZUB8dEnPSMykLtTKRRS3sT8', index=0, type='function' ) @@ -881,7 +877,7 @@ def test_non_pydantic_response_format(client: OpenAI, respx_mock: MockRouter, mo ], response_format={"type": "json_object"}, ), - content_snapshot=snapshot(external("d61558011839*.bin")), + content_snapshot=snapshot(external("56dbdd87d96d*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -894,12 +890,8 @@ def test_non_pydantic_response_format(client: OpenAI, respx_mock: MockRouter, mo index=0, logprobs=None, message=ParsedChatCompletionMessage[NoneType]( - content='\\n {\\n "location": "San Francisco, CA",\\n "weather": {\\n "temperature": "18°C",\\n -"condition": "Partly Cloudy",\\n "humidity": "72%",\\n "windSpeed": "15 km/h",\\n "windDirection": "NW"\\n -},\\n "forecast": [\\n {\\n "day": "Monday",\\n "high": "20°C",\\n "low": "14°C",\\n -"condition": "Sunny"\\n },\\n {\\n "day": "Tuesday",\\n "high": "19°C",\\n "low": "15°C",\\n -"condition": "Mostly Cloudy"\\n },\\n {\\n "day": "Wednesday",\\n "high": "18°C",\\n "low": -"14°C",\\n "condition": "Cloudy"\\n }\\n ]\\n }\\n', + content='\\n\\n\\n\\n\\n{\\n "error": "I\\'m unable to provide real-time weather information. Please check a +weather website or app for the current conditions in San Francisco."\\n}', function_call=None, parsed=None, refusal=None, @@ -930,7 +922,7 @@ def test_allows_non_strict_tools_but_no_parsing( } ], ), - content_snapshot=snapshot(external("2018feb66ae1*.bin")), + content_snapshot=snapshot(external("1f7bdb779714*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -965,7 +957,7 @@ def test_allows_non_strict_tools_but_no_parsing( name='get_weather', parsed_arguments=None ), - id='call_4XzlGBLtUe9dy3GVNV4jhq7h', + id='call_2NCpRQ3wEuK4kOH1budBUmZv', index=0, type='function' ) From a061e82e90e8f42e54a22de0a71716f3786f4c73 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Thu, 26 Sep 2024 18:22:10 -0400 Subject: [PATCH 3/6] revert tests --- ...7adb63fb6a8643672a1274b2890148e9090174.bin | 28 -- ...ac3d24cd4e18f92af3a1235d5b9da7f3fe6e52.bin | 100 ------ ...27a6abb0e3fd23e60de0518ee6ebfc195b2168.bin | 22 -- ...4effa1e9da604e94d375021ce7cae94f9f49eb.bin | 30 -- ...7ac0f54388b0fc552eb92c1e8985bc34607d92.bin | 70 ----- ...ce2eb8de605bb30072435e34a68959effe393d.bin | 80 ----- ...5c1fa094246017075d8fb1186a055477a3be29.bin | 36 --- ...322fb95dcff30516f95f4ad016f5f1836b7119.bin | 10 - ...85c5821e0d63315b1b54b23bb3fcf620149dbb.bin | 52 ---- ...b48b59672e24d4b102c5eeadea08d85c96b055.bin | 32 -- ...57957355ac381f2d486a69ee753fd3ee827c24.bin | 12 - ...570a36059927703e01dc6ee746c6d04784ab5e.bin | 36 --- tests/lib/chat/test_completions.py | 287 ++++-------------- tests/lib/chat/test_completions_streaming.py | 134 ++++---- 14 files changed, 128 insertions(+), 801 deletions(-) delete mode 100644 .inline-snapshot/external/04fbc4717b37193b9eddf2a3e27adb63fb6a8643672a1274b2890148e9090174.bin delete mode 100644 .inline-snapshot/external/07fc6368a4715e29a6af42cc20ac3d24cd4e18f92af3a1235d5b9da7f3fe6e52.bin delete mode 100644 .inline-snapshot/external/1f7bdb779714c94db3330faf1727a6abb0e3fd23e60de0518ee6ebfc195b2168.bin delete mode 100644 .inline-snapshot/external/2672a71c779361b96a4fef9bfe4effa1e9da604e94d375021ce7cae94f9f49eb.bin delete mode 100644 .inline-snapshot/external/3e005c33112c1aa98ffe09cf9f7ac0f54388b0fc552eb92c1e8985bc34607d92.bin delete mode 100644 .inline-snapshot/external/56dbdd87d96d3242be6d742c3ece2eb8de605bb30072435e34a68959effe393d.bin delete mode 100644 .inline-snapshot/external/78eb8762cd282036b1c330ec305c1fa094246017075d8fb1186a055477a3be29.bin delete mode 100644 .inline-snapshot/external/7cb5136bff92f1d912465d8aca322fb95dcff30516f95f4ad016f5f1836b7119.bin delete mode 100644 .inline-snapshot/external/80e47fe8b714fa686d61f0a89c85c5821e0d63315b1b54b23bb3fcf620149dbb.bin delete mode 100644 .inline-snapshot/external/831699086ad4d3127654f81e52b48b59672e24d4b102c5eeadea08d85c96b055.bin delete mode 100644 .inline-snapshot/external/c2bbcc5b189733e977f3230a9057957355ac381f2d486a69ee753fd3ee827c24.bin delete mode 100644 .inline-snapshot/external/f9807613408bd263c8793c9b92570a36059927703e01dc6ee746c6d04784ab5e.bin diff --git a/.inline-snapshot/external/04fbc4717b37193b9eddf2a3e27adb63fb6a8643672a1274b2890148e9090174.bin b/.inline-snapshot/external/04fbc4717b37193b9eddf2a3e27adb63fb6a8643672a1274b2890148e9090174.bin deleted file mode 100644 index e6f8238aff..0000000000 --- a/.inline-snapshot/external/04fbc4717b37193b9eddf2a3e27adb63fb6a8643672a1274b2890148e9090174.bin +++ /dev/null @@ -1,28 +0,0 @@ -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_nZUB8dEnPSMykLtTKRRS3sT8","type":"function","function":{"name":"get_weather","arguments":""}}],"refusal":null},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"city"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"San"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" Francisco"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\",\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"state"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"CA"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}]} - -data: {"id":"chatcmpl-ABgJDo0JIRWSH5W2cE0J8vaImv3Dm","object":"chat.completion.chunk","created":1727347607,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":48,"completion_tokens":19,"total_tokens":67,"completion_tokens_details":{"reasoning_tokens":0}}} - -data: [DONE] - diff --git a/.inline-snapshot/external/07fc6368a4715e29a6af42cc20ac3d24cd4e18f92af3a1235d5b9da7f3fe6e52.bin b/.inline-snapshot/external/07fc6368a4715e29a6af42cc20ac3d24cd4e18f92af3a1235d5b9da7f3fe6e52.bin deleted file mode 100644 index 2a7bfcfb95..0000000000 --- a/.inline-snapshot/external/07fc6368a4715e29a6af42cc20ac3d24cd4e18f92af3a1235d5b9da7f3fe6e52.bin +++ /dev/null @@ -1,100 +0,0 @@ -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"{\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"{\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"{\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"city"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"city"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"city"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"San"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"San"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"San"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\",\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"\",\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"\",\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"temperature"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"temperature"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"temperature"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"60"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":",\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"64"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":",\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"68"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":",\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"units"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"units"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"units"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"f"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"f"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"f"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\"}"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{"content":"\"}"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{"content":"\"}"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":1,"delta":{},"logprobs":null,"finish_reason":"stop"}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":2,"delta":{},"logprobs":null,"finish_reason":"stop"}]} - -data: {"id":"chatcmpl-ABgJ5tgXW9tmKvd18zcmxdO20kHsB","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":79,"completion_tokens":42,"total_tokens":121,"completion_tokens_details":{"reasoning_tokens":0}}} - -data: [DONE] - diff --git a/.inline-snapshot/external/1f7bdb779714c94db3330faf1727a6abb0e3fd23e60de0518ee6ebfc195b2168.bin b/.inline-snapshot/external/1f7bdb779714c94db3330faf1727a6abb0e3fd23e60de0518ee6ebfc195b2168.bin deleted file mode 100644 index 0d5363f24a..0000000000 --- a/.inline-snapshot/external/1f7bdb779714c94db3330faf1727a6abb0e3fd23e60de0518ee6ebfc195b2168.bin +++ /dev/null @@ -1,22 +0,0 @@ -data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_2NCpRQ3wEuK4kOH1budBUmZv","type":"function","function":{"name":"get_weather","arguments":""}}],"refusal":null},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"city"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"New"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" York"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" City"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}]} - -data: {"id":"chatcmpl-ABgJFbY9nTH13Xw1GScEkDQE52FZs","object":"chat.completion.chunk","created":1727347609,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":44,"completion_tokens":16,"total_tokens":60,"completion_tokens_details":{"reasoning_tokens":0}}} - -data: [DONE] - diff --git a/.inline-snapshot/external/2672a71c779361b96a4fef9bfe4effa1e9da604e94d375021ce7cae94f9f49eb.bin b/.inline-snapshot/external/2672a71c779361b96a4fef9bfe4effa1e9da604e94d375021ce7cae94f9f49eb.bin deleted file mode 100644 index 990f345797..0000000000 --- a/.inline-snapshot/external/2672a71c779361b96a4fef9bfe4effa1e9da604e94d375021ce7cae94f9f49eb.bin +++ /dev/null @@ -1,30 +0,0 @@ -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":null,"refusal":""},"logprobs":{"content":null,"refusal":[]},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":"I'm"},"logprobs":{"content":null,"refusal":[{"token":"I'm","logprob":-0.0012038043,"bytes":[73,39,109],"top_logprobs":[]}]},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" very"},"logprobs":{"content":null,"refusal":[{"token":" very","logprob":-0.7845193,"bytes":[32,118,101,114,121],"top_logprobs":[]}]},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" sorry"},"logprobs":{"content":null,"refusal":[{"token":" sorry","logprob":-8.537869e-6,"bytes":[32,115,111,114,114,121],"top_logprobs":[]}]},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":","},"logprobs":{"content":null,"refusal":[{"token":",","logprob":-0.000030828953,"bytes":[44],"top_logprobs":[]}]},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" but"},"logprobs":{"content":null,"refusal":[{"token":" but","logprob":-0.029754885,"bytes":[32,98,117,116],"top_logprobs":[]}]},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" I"},"logprobs":{"content":null,"refusal":[{"token":" I","logprob":-0.0018191704,"bytes":[32,73],"top_logprobs":[]}]},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" can't"},"logprobs":{"content":null,"refusal":[{"token":" can't","logprob":-0.0114746485,"bytes":[32,99,97,110,39,116],"top_logprobs":[]}]},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" assist"},"logprobs":{"content":null,"refusal":[{"token":" assist","logprob":-0.0023167727,"bytes":[32,97,115,115,105,115,116],"top_logprobs":[]}]},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" with"},"logprobs":{"content":null,"refusal":[{"token":" with","logprob":-0.0052390876,"bytes":[32,119,105,116,104],"top_logprobs":[]}]},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" that"},"logprobs":{"content":null,"refusal":[{"token":" that","logprob":-0.0016676846,"bytes":[32,116,104,97,116],"top_logprobs":[]}]},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":"."},"logprobs":{"content":null,"refusal":[{"token":".","logprob":-0.63433325,"bytes":[46],"top_logprobs":[]}]},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} - -data: {"id":"chatcmpl-ABgJ9aqwCf1HAHZGRClAbq88PrRlH","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":79,"completion_tokens":12,"total_tokens":91,"completion_tokens_details":{"reasoning_tokens":0}}} - -data: [DONE] - diff --git a/.inline-snapshot/external/3e005c33112c1aa98ffe09cf9f7ac0f54388b0fc552eb92c1e8985bc34607d92.bin b/.inline-snapshot/external/3e005c33112c1aa98ffe09cf9f7ac0f54388b0fc552eb92c1e8985bc34607d92.bin deleted file mode 100644 index 7a4eb5a420..0000000000 --- a/.inline-snapshot/external/3e005c33112c1aa98ffe09cf9f7ac0f54388b0fc552eb92c1e8985bc34607d92.bin +++ /dev/null @@ -1,70 +0,0 @@ -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"I'm"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" unable"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" provide"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" real"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" updates"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" For"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" most"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" San"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" I"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" recommend"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" checking"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" reliable"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" website"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" using"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" app"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} - -data: {"id":"chatcmpl-ABgJ4RlMHH82GUNEQF4bjmZEdFLig","object":"chat.completion.chunk","created":1727347598,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":14,"completion_tokens":31,"total_tokens":45,"completion_tokens_details":{"reasoning_tokens":0}}} - -data: [DONE] - diff --git a/.inline-snapshot/external/56dbdd87d96d3242be6d742c3ece2eb8de605bb30072435e34a68959effe393d.bin b/.inline-snapshot/external/56dbdd87d96d3242be6d742c3ece2eb8de605bb30072435e34a68959effe393d.bin deleted file mode 100644 index 59c7adf6e1..0000000000 --- a/.inline-snapshot/external/56dbdd87d96d3242be6d742c3ece2eb8de605bb30072435e34a68959effe393d.bin +++ /dev/null @@ -1,80 +0,0 @@ -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"{\n"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" \""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"error"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" \""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"I'm"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" unable"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" provide"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" real"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" Please"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" check"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" website"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" app"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" conditions"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" San"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":".\"\n"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"}"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} - -data: {"id":"chatcmpl-ABgJE74QyIvmNHT3oaPZuCqRyPlHb","object":"chat.completion.chunk","created":1727347608,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":19,"completion_tokens":36,"total_tokens":55,"completion_tokens_details":{"reasoning_tokens":0}}} - -data: [DONE] - diff --git a/.inline-snapshot/external/78eb8762cd282036b1c330ec305c1fa094246017075d8fb1186a055477a3be29.bin b/.inline-snapshot/external/78eb8762cd282036b1c330ec305c1fa094246017075d8fb1186a055477a3be29.bin deleted file mode 100644 index e689d0b523..0000000000 --- a/.inline-snapshot/external/78eb8762cd282036b1c330ec305c1fa094246017075d8fb1186a055477a3be29.bin +++ /dev/null @@ -1,36 +0,0 @@ -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_GaxOHx7TMW5ozlqDe64MlazG","type":"function","function":{"name":"GetWeatherArgs","arguments":""}}],"refusal":null},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"city"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Ed"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"inburgh"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\",\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"country"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"UK"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\",\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"units"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"c"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}]} - -data: {"id":"chatcmpl-ABgJ9cxULgzypB30VtSRmXj7tDxRD","object":"chat.completion.chunk","created":1727347603,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_9e15ccd6a4","choices":[],"usage":{"prompt_tokens":76,"completion_tokens":24,"total_tokens":100,"completion_tokens_details":{"reasoning_tokens":0}}} - -data: [DONE] - diff --git a/.inline-snapshot/external/7cb5136bff92f1d912465d8aca322fb95dcff30516f95f4ad016f5f1836b7119.bin b/.inline-snapshot/external/7cb5136bff92f1d912465d8aca322fb95dcff30516f95f4ad016f5f1836b7119.bin deleted file mode 100644 index a0f683ebbe..0000000000 --- a/.inline-snapshot/external/7cb5136bff92f1d912465d8aca322fb95dcff30516f95f4ad016f5f1836b7119.bin +++ /dev/null @@ -1,10 +0,0 @@ -data: {"id":"chatcmpl-ABgJ6fY83DkQIprIS0OUEJuQikPwJ","object":"chat.completion.chunk","created":1727347600,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_7568d46099","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ6fY83DkQIprIS0OUEJuQikPwJ","object":"chat.completion.chunk","created":1727347600,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_7568d46099","choices":[{"index":0,"delta":{"content":"{\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ6fY83DkQIprIS0OUEJuQikPwJ","object":"chat.completion.chunk","created":1727347600,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_7568d46099","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"length"}]} - -data: {"id":"chatcmpl-ABgJ6fY83DkQIprIS0OUEJuQikPwJ","object":"chat.completion.chunk","created":1727347600,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_7568d46099","choices":[],"usage":{"prompt_tokens":79,"completion_tokens":1,"total_tokens":80,"completion_tokens_details":{"reasoning_tokens":0}}} - -data: [DONE] - diff --git a/.inline-snapshot/external/80e47fe8b714fa686d61f0a89c85c5821e0d63315b1b54b23bb3fcf620149dbb.bin b/.inline-snapshot/external/80e47fe8b714fa686d61f0a89c85c5821e0d63315b1b54b23bb3fcf620149dbb.bin deleted file mode 100644 index 0f4f3b1b80..0000000000 --- a/.inline-snapshot/external/80e47fe8b714fa686d61f0a89c85c5821e0d63315b1b54b23bb3fcf620149dbb.bin +++ /dev/null @@ -1,52 +0,0 @@ -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_DUIfURCaEhuke5aUHUG9drKQ","type":"function","function":{"name":"GetWeatherArgs","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"ci"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ty\": "}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"Edinb"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"urgh"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\", \"c"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ountry"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\": \""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"UK\", "}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"units"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\": \""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"c\"}"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_bxtBSMiFZj9tpEEoR2HvbYAV","type":"function","function":{"name":"get_stock_price","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"ti"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"cker\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":": \"AAP"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"L\", "}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"\"exch"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ange\":"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":" \"NA"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"SDAQ\""}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}]} - -data: {"id":"chatcmpl-ABgJBrhoaSMAmErWVX0sLqDl8AW9I","object":"chat.completion.chunk","created":1727347605,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_b40fb1c6fb","choices":[],"usage":{"prompt_tokens":149,"completion_tokens":60,"total_tokens":209,"completion_tokens_details":{"reasoning_tokens":0}}} - -data: [DONE] - diff --git a/.inline-snapshot/external/831699086ad4d3127654f81e52b48b59672e24d4b102c5eeadea08d85c96b055.bin b/.inline-snapshot/external/831699086ad4d3127654f81e52b48b59672e24d4b102c5eeadea08d85c96b055.bin deleted file mode 100644 index 355dd754c1..0000000000 --- a/.inline-snapshot/external/831699086ad4d3127654f81e52b48b59672e24d4b102c5eeadea08d85c96b055.bin +++ /dev/null @@ -1,32 +0,0 @@ -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":null,"refusal":""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":"I'm"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" very"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" sorry"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":","},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" but"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" I"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" can't"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" assist"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" with"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" that"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":" request"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"refusal":"."},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} - -data: {"id":"chatcmpl-ABgJ7rvPQbNqAYplmS4rmJ0auZTqR","object":"chat.completion.chunk","created":1727347601,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":79,"completion_tokens":13,"total_tokens":92,"completion_tokens_details":{"reasoning_tokens":0}}} - -data: [DONE] - diff --git a/.inline-snapshot/external/c2bbcc5b189733e977f3230a9057957355ac381f2d486a69ee753fd3ee827c24.bin b/.inline-snapshot/external/c2bbcc5b189733e977f3230a9057957355ac381f2d486a69ee753fd3ee827c24.bin deleted file mode 100644 index 114635e963..0000000000 --- a/.inline-snapshot/external/c2bbcc5b189733e977f3230a9057957355ac381f2d486a69ee753fd3ee827c24.bin +++ /dev/null @@ -1,12 +0,0 @@ -data: {"id":"chatcmpl-ABgJ8cHXA6KgIqzM4i65GWmSOmpGc","object":"chat.completion.chunk","created":1727347602,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":{"content":[],"refusal":null},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ8cHXA6KgIqzM4i65GWmSOmpGc","object":"chat.completion.chunk","created":1727347602,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"Foo"},"logprobs":{"content":[{"token":"Foo","logprob":-0.00867213,"bytes":[70,111,111],"top_logprobs":[]}],"refusal":null},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ8cHXA6KgIqzM4i65GWmSOmpGc","object":"chat.completion.chunk","created":1727347602,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"!"},"logprobs":{"content":[{"token":"!","logprob":-0.19675663,"bytes":[33],"top_logprobs":[]}],"refusal":null},"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ8cHXA6KgIqzM4i65GWmSOmpGc","object":"chat.completion.chunk","created":1727347602,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} - -data: {"id":"chatcmpl-ABgJ8cHXA6KgIqzM4i65GWmSOmpGc","object":"chat.completion.chunk","created":1727347602,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":9,"completion_tokens":2,"total_tokens":11,"completion_tokens_details":{"reasoning_tokens":0}}} - -data: [DONE] - diff --git a/.inline-snapshot/external/f9807613408bd263c8793c9b92570a36059927703e01dc6ee746c6d04784ab5e.bin b/.inline-snapshot/external/f9807613408bd263c8793c9b92570a36059927703e01dc6ee746c6d04784ab5e.bin deleted file mode 100644 index d1753b3ae4..0000000000 --- a/.inline-snapshot/external/f9807613408bd263c8793c9b92570a36059927703e01dc6ee746c6d04784ab5e.bin +++ /dev/null @@ -1,36 +0,0 @@ -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"{\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"city"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"San"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\",\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"temperature"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"64"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":",\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"units"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\":\""},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"f"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{"content":"\"}"},"logprobs":null,"finish_reason":null}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} - -data: {"id":"chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0","object":"chat.completion.chunk","created":1727347599,"model":"gpt-4o-2024-08-06","system_fingerprint":"fp_5050236cbd","choices":[],"usage":{"prompt_tokens":79,"completion_tokens":14,"total_tokens":93,"completion_tokens_details":{"reasoning_tokens":0}}} - -data: [DONE] - diff --git a/tests/lib/chat/test_completions.py b/tests/lib/chat/test_completions.py index 2588b12698..d66630fa3a 100644 --- a/tests/lib/chat/test_completions.py +++ b/tests/lib/chat/test_completions.py @@ -3,7 +3,7 @@ import os import json from enum import Enum -from typing import Any, List, Callable, Optional, Awaitable +from typing import Any, List, Callable, Optional from typing_extensions import Literal, TypeVar import httpx @@ -43,7 +43,7 @@ def test_parse_nothing(client: OpenAI, respx_mock: MockRouter, monkeypatch: pyte ], ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABgIZhG0R51R94epwHjt5bgb83rz4", "object": "chat.completion", "created": 1727347567, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "I\'m sorry, but I can\'t provide real-time weather updates. To find out the current weather in San Francisco, I recommend checking a reliable weather website or app.", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 14, "completion_tokens": 32, "total_tokens": 46, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' + '{"id": "chatcmpl-ABfvaueLEMLNYbT8YzpJxsmiQ6HSY", "object": "chat.completion", "created": 1727346142, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "I\'m unable to provide real-time weather updates. To get the current weather in San Francisco, I recommend checking a reliable weather website or app like the Weather Channel or a local news station.", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 14, "completion_tokens": 37, "total_tokens": 51, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' ), mock_client=client, respx_mock=respx_mock, @@ -58,8 +58,8 @@ def test_parse_nothing(client: OpenAI, respx_mock: MockRouter, monkeypatch: pyte index=0, logprobs=None, message=ParsedChatCompletionMessage[NoneType]( - content="I'm sorry, but I can't provide real-time weather updates. To find out the current weather in -San Francisco, I recommend checking a reliable weather website or app.", + content="I'm unable to provide real-time weather updates. To get the current weather in San Francisco, I +recommend checking a reliable weather website or app like the Weather Channel or a local news station.", function_call=None, parsed=None, refusal=None, @@ -68,17 +68,17 @@ def test_parse_nothing(client: OpenAI, respx_mock: MockRouter, monkeypatch: pyte ) ) ], - created=1727347567, - id='chatcmpl-ABgIZhG0R51R94epwHjt5bgb83rz4', + created=1727346142, + id='chatcmpl-ABfvaueLEMLNYbT8YzpJxsmiQ6HSY', model='gpt-4o-2024-08-06', object='chat.completion', service_tier=None, - system_fingerprint='fp_7568d46099', + system_fingerprint='fp_b40fb1c6fb', usage=CompletionUsage( - completion_tokens=32, + completion_tokens=37, completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), prompt_tokens=14, - total_tokens=46 + total_tokens=51 ) ) """ @@ -104,7 +104,7 @@ class Location(BaseModel): response_format=Location, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABgIaJhdAmzfDy7q3HCmK8jLHpja9", "object": "chat.completion", "created": 1727347568, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":68,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' + '{"id": "chatcmpl-ABfvbtVnTu5DeC4EFnRYj8mtfOM99", "object": "chat.completion", "created": 1727346143, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":65,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' ), mock_client=client, respx_mock=respx_mock, @@ -119,21 +119,21 @@ class Location(BaseModel): index=0, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":68,"units":"f"}', + content='{"city":"San Francisco","temperature":65,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=68.0, units='f'), + parsed=Location(city='San Francisco', temperature=65.0, units='f'), refusal=None, role='assistant', tool_calls=[] ) ) ], - created=1727347568, - id='chatcmpl-ABgIaJhdAmzfDy7q3HCmK8jLHpja9', + created=1727346143, + id='chatcmpl-ABfvbtVnTu5DeC4EFnRYj8mtfOM99', model='gpt-4o-2024-08-06', object='chat.completion', service_tier=None, - system_fingerprint='fp_7568d46099', + system_fingerprint='fp_5050236cbd', usage=CompletionUsage( completion_tokens=14, completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), @@ -166,7 +166,7 @@ class Location(BaseModel): response_format=Location, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABgIg6AynR6shXkfPUb2F0PQFA7f8", "object": "chat.completion", "created": 1727347574, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":68,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 88, "completion_tokens": 14, "total_tokens": 102, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' + '{"id": "chatcmpl-ABfvcC8grKYsRkSoMp9CCAhbXAd0b", "object": "chat.completion", "created": 1727346144, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":65,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 88, "completion_tokens": 14, "total_tokens": 102, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' ), mock_client=client, respx_mock=respx_mock, @@ -181,17 +181,17 @@ class Location(BaseModel): index=0, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":68,"units":"f"}', + content='{"city":"San Francisco","temperature":65,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=68.0, units='f'), + parsed=Location(city='San Francisco', temperature=65.0, units='f'), refusal=None, role='assistant', tool_calls=[] ) ) ], - created=1727347574, - id='chatcmpl-ABgIg6AynR6shXkfPUb2F0PQFA7f8', + created=1727346144, + id='chatcmpl-ABfvcC8grKYsRkSoMp9CCAhbXAd0b', model='gpt-4o-2024-08-06', object='chat.completion', service_tier=None, @@ -232,7 +232,7 @@ class ColorDetection(BaseModel): response_format=ColorDetection, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABgIhcpfJ6iawoLkZbJ7JDuTunZiy", "object": "chat.completion", "created": 1727347575, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"color\\":\\"red\\",\\"hex_color_code\\":\\"#FF0000\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 109, "completion_tokens": 14, "total_tokens": 123, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' + '{"id": "chatcmpl-ABfvjIatz0zrZu50gRbMtlp0asZpz", "object": "chat.completion", "created": 1727346151, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"color\\":\\"red\\",\\"hex_color_code\\":\\"#FF0000\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 109, "completion_tokens": 14, "total_tokens": 123, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' ), mock_client=client, respx_mock=respx_mock, @@ -279,7 +279,7 @@ class Location(BaseModel): response_format=Location, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABgIht4RFnH9kv9s0zCqfRfVr2wjX", "object": "chat.completion", "created": 1727347575, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":59,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}, {"index": 1, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":68,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}, {"index": 2, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":67,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 42, "total_tokens": 121, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' + '{"id": "chatcmpl-ABfvp8qzboW92q8ONDF4DPHlI7ckC", "object": "chat.completion", "created": 1727346157, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":64,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}, {"index": 1, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":65,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}, {"index": 2, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":63.0,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 44, "total_tokens": 123, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' ), mock_client=client, respx_mock=respx_mock, @@ -293,9 +293,9 @@ class Location(BaseModel): index=0, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":59,"units":"f"}', + content='{"city":"San Francisco","temperature":64,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=59.0, units='f'), + parsed=Location(city='San Francisco', temperature=64.0, units='f'), refusal=None, role='assistant', tool_calls=[] @@ -306,9 +306,9 @@ class Location(BaseModel): index=1, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":68,"units":"f"}', + content='{"city":"San Francisco","temperature":65,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=68.0, units='f'), + parsed=Location(city='San Francisco', temperature=65.0, units='f'), refusal=None, role='assistant', tool_calls=[] @@ -319,9 +319,9 @@ class Location(BaseModel): index=2, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":67,"units":"f"}', + content='{"city":"San Francisco","temperature":63.0,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=67.0, units='f'), + parsed=Location(city='San Francisco', temperature=63.0, units='f'), refusal=None, role='assistant', tool_calls=[] @@ -353,7 +353,7 @@ class CalendarEvent: response_format=CalendarEvent, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABgIiIO7LjsAsuZIzMtIdqzlCzSB4", "object": "chat.completion", "created": 1727347576, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"name\\":\\"Science Fair\\",\\"date\\":\\"Friday\\",\\"participants\\":[\\"Alice\\",\\"Bob\\"]}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 92, "completion_tokens": 17, "total_tokens": 109, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' + '{"id": "chatcmpl-ABfvqhz4uUUWsw8Ohw2Mp9B4sKKV8", "object": "chat.completion", "created": 1727346158, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"name\\":\\"Science Fair\\",\\"date\\":\\"Friday\\",\\"participants\\":[\\"Alice\\",\\"Bob\\"]}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 92, "completion_tokens": 17, "total_tokens": 109, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' ), mock_client=client, respx_mock=respx_mock, @@ -377,12 +377,12 @@ class CalendarEvent: ) ) ], - created=1727347576, - id='chatcmpl-ABgIiIO7LjsAsuZIzMtIdqzlCzSB4', + created=1727346158, + id='chatcmpl-ABfvqhz4uUUWsw8Ohw2Mp9B4sKKV8', model='gpt-4o-2024-08-06', object='chat.completion', service_tier=None, - system_fingerprint='fp_b40fb1c6fb', + system_fingerprint='fp_7568d46099', usage=CompletionUsage( completion_tokens=17, completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), @@ -409,7 +409,7 @@ def test_pydantic_tool_model_all_types(client: OpenAI, respx_mock: MockRouter, m response_format=Query, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABgIkOf7oA8OBGlO7YohLZHiKHJmJ", "object": "chat.completion", "created": 1727347578, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_c8rJvUlGYId0FlVyVNvrWI3q", "type": "function", "function": {"name": "Query", "arguments": "{\\"name\\":\\"FulfilledButLateOrders\\",\\"table_name\\":\\"orders\\",\\"columns\\":[\\"id\\",\\"status\\",\\"expected_delivery_date\\",\\"delivered_at\\",\\"shipped_at\\",\\"ordered_at\\"],\\"conditions\\":[{\\"column\\":\\"ordered_at\\",\\"operator\\":\\">=\\",\\"value\\":\\"2022-05-01\\"},{\\"column\\":\\"ordered_at\\",\\"operator\\":\\"<\\",\\"value\\":\\"2022-06-01\\"},{\\"column\\":\\"status\\",\\"operator\\":\\"=\\",\\"value\\":\\"fulfilled\\"},{\\"column\\":\\"delivered_at\\",\\"operator\\":\\">\\",\\"value\\":{\\"column_name\\":\\"expected_delivery_date\\"}}],\\"order_by\\":\\"asc\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 512, "completion_tokens": 121, "total_tokens": 633, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_143bb8492c"}' + '{"id": "chatcmpl-ABfvtNiaTNUF6OymZUnEFc9lPq9p1", "object": "chat.completion", "created": 1727346161, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_NKpApJybW1MzOjZO2FzwYw0d", "type": "function", "function": {"name": "Query", "arguments": "{\\"name\\":\\"May 2022 Fulfilled Orders Not Delivered on Time\\",\\"table_name\\":\\"orders\\",\\"columns\\":[\\"id\\",\\"status\\",\\"expected_delivery_date\\",\\"delivered_at\\",\\"shipped_at\\",\\"ordered_at\\",\\"canceled_at\\"],\\"conditions\\":[{\\"column\\":\\"ordered_at\\",\\"operator\\":\\">=\\",\\"value\\":\\"2022-05-01\\"},{\\"column\\":\\"ordered_at\\",\\"operator\\":\\"<=\\",\\"value\\":\\"2022-05-31\\"},{\\"column\\":\\"status\\",\\"operator\\":\\"=\\",\\"value\\":\\"fulfilled\\"},{\\"column\\":\\"delivered_at\\",\\"operator\\":\\">\\",\\"value\\":{\\"column_name\\":\\"expected_delivery_date\\"}}],\\"order_by\\":\\"asc\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 512, "completion_tokens": 132, "total_tokens": 644, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' ), mock_client=client, respx_mock=respx_mock, @@ -430,10 +430,11 @@ def test_pydantic_tool_model_all_types(client: OpenAI, respx_mock: MockRouter, m tool_calls=[ ParsedFunctionToolCall( function=ParsedFunction( - arguments='{"name":"FulfilledButLateOrders","table_name":"orders","columns":["id","status","expected -_delivery_date","delivered_at","shipped_at","ordered_at"],"conditions":[{"column":"ordered_at","operator":">=","value":" -2022-05-01"},{"column":"ordered_at","operator":"<","value":"2022-06-01"},{"column":"status","operator":"=","value":"fulf -illed"},{"column":"delivered_at","operator":">","value":{"column_name":"expected_delivery_date"}}],"order_by":"asc"}', + arguments='{"name":"May 2022 Fulfilled Orders Not Delivered on +Time","table_name":"orders","columns":["id","status","expected_delivery_date","delivered_at","shipped_at","ordered_at"," +canceled_at"],"conditions":[{"column":"ordered_at","operator":">=","value":"2022-05-01"},{"column":"ordered_at","operato +r":"<=","value":"2022-05-31"},{"column":"status","operator":"=","value":"fulfilled"},{"column":"delivered_at","operator" +:">","value":{"column_name":"expected_delivery_date"}}],"order_by":"asc"}', name='Query', parsed_arguments=Query( columns=[ @@ -442,11 +443,12 @@ def test_pydantic_tool_model_all_types(client: OpenAI, respx_mock: MockRouter, m , , , - + , + ], conditions=[ Condition(column='ordered_at', operator=='>, value='2022-05-01'), - Condition(column='ordered_at', operator=, value='2022-06-01'), + Condition(column='ordered_at', operator=, table_name= ) ), - id='call_c8rJvUlGYId0FlVyVNvrWI3q', + id='call_NKpApJybW1MzOjZO2FzwYw0d', type='function' ) ] @@ -490,7 +492,7 @@ class Location(BaseModel): response_format=Location, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABgIqaylwQNDVZAHe5lDKk0Ax7YS7", "object": "chat.completion", "created": 1727347584, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"", "refusal": null}, "logprobs": null, "finish_reason": "length"}], "usage": {"prompt_tokens": 79, "completion_tokens": 1, "total_tokens": 80, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' + '{"id": "chatcmpl-ABfvvX7eB1KsfeZj8VcF3z7G7SbaA", "object": "chat.completion", "created": 1727346163, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"", "refusal": null}, "logprobs": null, "finish_reason": "length"}], "usage": {"prompt_tokens": 79, "completion_tokens": 1, "total_tokens": 80, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' ), mock_client=client, respx_mock=respx_mock, @@ -516,7 +518,7 @@ class Location(BaseModel): response_format=Location, ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABgIq8R3DWxhOWoorrE8RgxJTPkYS", "object": "chat.completion", "created": 1727347584, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "refusal": "I\'m sorry, but I can\'t assist with that request."}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 12, "total_tokens": 91, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' + '{"id": "chatcmpl-ABfvwoKVWPQj2UPlAcAKM7s40GsRx", "object": "chat.completion", "created": 1727346164, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "refusal": "I\'m very sorry, but I can\'t assist with that."}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 12, "total_tokens": 91, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' ), mock_client=client, respx_mock=respx_mock, @@ -533,7 +535,7 @@ class Location(BaseModel): content=None, function_call=None, parsed=None, - refusal="I'm sorry, but I can't assist with that request.", + refusal="I'm very sorry, but I can't assist with that.", role='assistant', tool_calls=[] ) @@ -564,7 +566,7 @@ class GetWeatherArgs(BaseModel): ], ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABgIrdZCy0ozC9KtEz7S1ZnTOSCjg", "object": "chat.completion", "created": 1727347585, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_XTnBuYWrgBj4X6EAx18u2DMx", "type": "function", "function": {"name": "GetWeatherArgs", "arguments": "{\\"city\\":\\"Edinburgh\\",\\"country\\":\\"United Kingdom\\",\\"units\\":\\"c\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 76, "completion_tokens": 25, "total_tokens": 101, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' + '{"id": "chatcmpl-ABfvx6Z4dchiW2nya1N8KMsHFrQRE", "object": "chat.completion", "created": 1727346165, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_Y6qJ7ofLgOrBnMD5WbVAeiRV", "type": "function", "function": {"name": "GetWeatherArgs", "arguments": "{\\"city\\":\\"Edinburgh\\",\\"country\\":\\"UK\\",\\"units\\":\\"c\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 76, "completion_tokens": 24, "total_tokens": 100, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_e45dabd248"}' ), mock_client=client, respx_mock=respx_mock, @@ -586,11 +588,11 @@ class GetWeatherArgs(BaseModel): tool_calls=[ ParsedFunctionToolCall( function=ParsedFunction( - arguments='{"city":"Edinburgh","country":"United Kingdom","units":"c"}', + arguments='{"city":"Edinburgh","country":"UK","units":"c"}', name='GetWeatherArgs', - parsed_arguments=GetWeatherArgs(city='Edinburgh', country='United Kingdom', units='c') + parsed_arguments=GetWeatherArgs(city='Edinburgh', country='UK', units='c') ), - id='call_XTnBuYWrgBj4X6EAx18u2DMx', + id='call_Y6qJ7ofLgOrBnMD5WbVAeiRV', type='function' ) ] @@ -635,7 +637,7 @@ class GetStockPrice(BaseModel): ], ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABgIyhXFTmHutycKlMLZwNDlB9R8B", "object": "chat.completion", "created": 1727347592, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_XcVkrO33vBQCOhx224TKi4NW", "type": "function", "function": {"name": "GetWeatherArgs", "arguments": "{\\"city\\": \\"Edinburgh\\", \\"country\\": \\"UK\\", \\"units\\": \\"c\\"}"}}, {"id": "call_bf4aX8l8QAARQPdaE6HOpzG0", "type": "function", "function": {"name": "get_stock_price", "arguments": "{\\"ticker\\": \\"AAPL\\", \\"exchange\\": \\"NASDAQ\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 149, "completion_tokens": 60, "total_tokens": 209, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' + '{"id": "chatcmpl-ABfvyvfNWKcl7Ohqos4UFrmMs1v4C", "object": "chat.completion", "created": 1727346166, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_fdNz3vOBKYgOIpMdWotB9MjY", "type": "function", "function": {"name": "GetWeatherArgs", "arguments": "{\\"city\\": \\"Edinburgh\\", \\"country\\": \\"GB\\", \\"units\\": \\"c\\"}"}}, {"id": "call_h1DWI1POMJLb0KwIyQHWXD4p", "type": "function", "function": {"name": "get_stock_price", "arguments": "{\\"ticker\\": \\"AAPL\\", \\"exchange\\": \\"NASDAQ\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 149, "completion_tokens": 60, "total_tokens": 209, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_b40fb1c6fb"}' ), mock_client=client, respx_mock=respx_mock, @@ -657,11 +659,11 @@ class GetStockPrice(BaseModel): tool_calls=[ ParsedFunctionToolCall( function=ParsedFunction( - arguments='{"city": "Edinburgh", "country": "UK", "units": "c"}', + arguments='{"city": "Edinburgh", "country": "GB", "units": "c"}', name='GetWeatherArgs', - parsed_arguments=GetWeatherArgs(city='Edinburgh', country='UK', units='c') + parsed_arguments=GetWeatherArgs(city='Edinburgh', country='GB', units='c') ), - id='call_XcVkrO33vBQCOhx224TKi4NW', + id='call_fdNz3vOBKYgOIpMdWotB9MjY', type='function' ), ParsedFunctionToolCall( @@ -670,7 +672,7 @@ class GetStockPrice(BaseModel): name='get_stock_price', parsed_arguments=GetStockPrice(exchange='NASDAQ', ticker='AAPL') ), - id='call_bf4aX8l8QAARQPdaE6HOpzG0', + id='call_h1DWI1POMJLb0KwIyQHWXD4p', type='function' ) ] @@ -715,7 +717,7 @@ def test_parse_strict_tools(client: OpenAI, respx_mock: MockRouter, monkeypatch: ], ), content_snapshot=snapshot( - '{"id": "chatcmpl-ABgIzSBJWifrpLSLto62LgecRNEVy", "object": "chat.completion", "created": 1727347593, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_KDRFFW5ivLsEC3mxFJH8jpfA", "type": "function", "function": {"name": "get_weather", "arguments": "{\\"city\\":\\"San Francisco\\",\\"state\\":\\"CA\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 48, "completion_tokens": 19, "total_tokens": 67, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' + '{"id": "chatcmpl-ABfvzdvCI6RaIkiEFNjqGXCSYnlzf", "object": "chat.completion", "created": 1727346167, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": null, "tool_calls": [{"id": "call_CUdUoJpsWWVdxXntucvnol1M", "type": "function", "function": {"name": "get_weather", "arguments": "{\\"city\\":\\"San Francisco\\",\\"state\\":\\"CA\\"}"}}], "refusal": null}, "logprobs": null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 48, "completion_tokens": 19, "total_tokens": 67, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' ), mock_client=client, respx_mock=respx_mock, @@ -741,7 +743,7 @@ def test_parse_strict_tools(client: OpenAI, respx_mock: MockRouter, monkeypatch: name='get_weather', parsed_arguments={'city': 'San Francisco', 'state': 'CA'} ), - id='call_KDRFFW5ivLsEC3mxFJH8jpfA', + id='call_CUdUoJpsWWVdxXntucvnol1M', type='function' ) ] @@ -771,139 +773,6 @@ def test_parse_non_strict_tools(client: OpenAI) -> None: ) -@pytest.mark.respx(base_url=base_url) -def test_parse_pydantic_raw_response(client: OpenAI, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch) -> None: - class Location(BaseModel): - city: str - temperature: float - units: Literal["c", "f"] - - response = _make_snapshot_request( - lambda c: c.beta.chat.completions.with_raw_response.parse( - model="gpt-4o-2024-08-06", - messages=[ - { - "role": "user", - "content": "What's the weather like in SF?", - }, - ], - response_format=Location, - ), - content_snapshot=snapshot( - '{"id": "chatcmpl-ABgJ0eZEWD1qADq9WVMnR9UbKDWya", "object": "chat.completion", "created": 1727347594, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":63,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_7568d46099"}' - ), - mock_client=client, - respx_mock=respx_mock, - ) - assert response.http_request.headers.get("x-stainless-helper-method") == "beta.chat.completions.parse" - - completion = response.parse() - message = completion.choices[0].message - assert message.parsed is not None - assert isinstance(message.parsed.city, str) - assert print_obj(completion, monkeypatch) == snapshot( - """\ -ParsedChatCompletion[Location]( - choices=[ - ParsedChoice[Location]( - finish_reason='stop', - index=0, - logprobs=None, - message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":63,"units":"f"}', - function_call=None, - parsed=Location(city='San Francisco', temperature=63.0, units='f'), - refusal=None, - role='assistant', - tool_calls=[] - ) - ) - ], - created=1727347594, - id='chatcmpl-ABgJ0eZEWD1qADq9WVMnR9UbKDWya', - model='gpt-4o-2024-08-06', - object='chat.completion', - service_tier=None, - system_fingerprint='fp_7568d46099', - usage=CompletionUsage( - completion_tokens=14, - completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), - prompt_tokens=79, - total_tokens=93 - ) -) -""" - ) - - -@pytest.mark.respx(base_url=base_url) -@pytest.mark.asyncio -async def test_async_parse_pydantic_raw_response( - async_client: AsyncOpenAI, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch -) -> None: - class Location(BaseModel): - city: str - temperature: float - units: Literal["c", "f"] - - response = await _make_async_snapshot_request( - lambda c: c.beta.chat.completions.with_raw_response.parse( - model="gpt-4o-2024-08-06", - messages=[ - { - "role": "user", - "content": "What's the weather like in SF?", - }, - ], - response_format=Location, - ), - content_snapshot=snapshot( - '{"id": "chatcmpl-ABgJ3taZMsRGuUqeKOrm9k6Koja9q", "object": "chat.completion", "created": 1727347597, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":14,\\"units\\":\\"c\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' - ), - mock_client=async_client, - respx_mock=respx_mock, - ) - assert response.http_request.headers.get("x-stainless-helper-method") == "beta.chat.completions.parse" - - completion = response.parse() - message = completion.choices[0].message - assert message.parsed is not None - assert isinstance(message.parsed.city, str) - assert print_obj(completion, monkeypatch) == snapshot( - """\ -ParsedChatCompletion[Location]( - choices=[ - ParsedChoice[Location]( - finish_reason='stop', - index=0, - logprobs=None, - message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":14,"units":"c"}', - function_call=None, - parsed=Location(city='San Francisco', temperature=14.0, units='c'), - refusal=None, - role='assistant', - tool_calls=[] - ) - ) - ], - created=1727347597, - id='chatcmpl-ABgJ3taZMsRGuUqeKOrm9k6Koja9q', - model='gpt-4o-2024-08-06', - object='chat.completion', - service_tier=None, - system_fingerprint='fp_5050236cbd', - usage=CompletionUsage( - completion_tokens=14, - completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), - prompt_tokens=79, - total_tokens=93 - ) -) -""" - ) - - @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) def test_parse_method_in_sync(sync: bool, client: OpenAI, async_client: AsyncOpenAI) -> None: checking_client: OpenAI | AsyncOpenAI = client if sync else async_client @@ -955,45 +824,3 @@ def _on_response(response: httpx.Response) -> None: client.close() return result - - -async def _make_async_snapshot_request( - func: Callable[[AsyncOpenAI], Awaitable[_T]], - *, - content_snapshot: Any, - respx_mock: MockRouter, - mock_client: AsyncOpenAI, -) -> _T: - live = os.environ.get("OPENAI_LIVE") == "1" - if live: - - async def _on_response(response: httpx.Response) -> None: - # update the content snapshot - assert json.dumps(json.loads(await response.aread())) == content_snapshot - - respx_mock.stop() - - client = AsyncOpenAI( - http_client=httpx.AsyncClient( - event_hooks={ - "response": [_on_response], - } - ) - ) - else: - respx_mock.post("/chat/completions").mock( - return_value=httpx.Response( - 200, - content=content_snapshot._old_value, - headers={"content-type": "application/json"}, - ) - ) - - client = mock_client - - result = await func(client) - - if live: - await client.close() - - return result diff --git a/tests/lib/chat/test_completions_streaming.py b/tests/lib/chat/test_completions_streaming.py index 2db9a47f5d..ce402cd158 100644 --- a/tests/lib/chat/test_completions_streaming.py +++ b/tests/lib/chat/test_completions_streaming.py @@ -48,7 +48,7 @@ def test_parse_nothing(client: OpenAI, respx_mock: MockRouter, monkeypatch: pyte }, ], ), - content_snapshot=snapshot(external("3e005c33112c*.bin")), + content_snapshot=snapshot(external("e2aad469b71d*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -61,8 +61,8 @@ def test_parse_nothing(client: OpenAI, respx_mock: MockRouter, monkeypatch: pyte index=0, logprobs=None, message=ParsedChatCompletionMessage[NoneType]( - content="I'm unable to provide real-time weather updates. For the most current weather in San Francisco, I -recommend checking a reliable weather website or using a weather app.", + content="I'm unable to provide real-time weather updates. To get the current weather in San Francisco, I +recommend checking a reliable weather website or a weather app.", function_call=None, parsed=None, refusal=None, @@ -76,8 +76,8 @@ def test_parse_nothing(client: OpenAI, respx_mock: MockRouter, monkeypatch: pyte assert print_obj(listener.get_event_by_type("content.done"), monkeypatch) == snapshot( """\ ContentDoneEvent[NoneType]( - content="I'm unable to provide real-time weather updates. For the most current weather in San Francisco, I recommend -checking a reliable weather website or using a weather app.", + content="I'm unable to provide real-time weather updates. To get the current weather in San Francisco, I recommend +checking a reliable weather website or a weather app.", parsed=None, type='content.done' ) @@ -109,7 +109,7 @@ def on_event(stream: ChatCompletionStream[Location], event: ChatCompletionStream ], response_format=Location, ), - content_snapshot=snapshot(external("f9807613408b*.bin")), + content_snapshot=snapshot(external("7e5ea4d12e7c*.bin")), mock_client=client, respx_mock=respx_mock, on_event=on_event, @@ -138,17 +138,17 @@ def on_event(stream: ChatCompletionStream[Location], event: ChatCompletionStream index=0, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":64,"units":"f"}', + content='{"city":"San Francisco","temperature":61,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=64.0, units='f'), + parsed=Location(city='San Francisco', temperature=61.0, units='f'), refusal=None, role='assistant', tool_calls=[] ) ) ], - created=1727347599, - id='chatcmpl-ABgJ5sWpemWKMgA4pd0GRlmmpGHX0', + created=1727346169, + id='chatcmpl-ABfw1e5abtU8OwGr15vOreYVb2MiF', model='gpt-4o-2024-08-06', object='chat.completion', service_tier=None, @@ -165,8 +165,8 @@ def on_event(stream: ChatCompletionStream[Location], event: ChatCompletionStream assert print_obj(listener.get_event_by_type("content.done"), monkeypatch) == snapshot( """\ ContentDoneEvent[Location]( - content='{"city":"San Francisco","temperature":64,"units":"f"}', - parsed=Location(city='San Francisco', temperature=64.0, units='f'), + content='{"city":"San Francisco","temperature":61,"units":"f"}', + parsed=Location(city='San Francisco', temperature=61.0, units='f'), type='content.done' ) """ @@ -194,7 +194,7 @@ class Location(BaseModel): n=3, response_format=Location, ), - content_snapshot=snapshot(external("07fc6368a471*.bin")), + content_snapshot=snapshot(external("a491adda08c3*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -308,9 +308,9 @@ class Location(BaseModel): index=0, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":60,"units":"f"}', + content='{"city":"San Francisco","temperature":65,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=60.0, units='f'), + parsed=Location(city='San Francisco', temperature=65.0, units='f'), refusal=None, role='assistant', tool_calls=[] @@ -321,9 +321,9 @@ class Location(BaseModel): index=1, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":64,"units":"f"}', + content='{"city":"San Francisco","temperature":61,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=64.0, units='f'), + parsed=Location(city='San Francisco', temperature=61.0, units='f'), refusal=None, role='assistant', tool_calls=[] @@ -334,9 +334,9 @@ class Location(BaseModel): index=2, logprobs=None, message=ParsedChatCompletionMessage[Location]( - content='{"city":"San Francisco","temperature":68,"units":"f"}', + content='{"city":"San Francisco","temperature":59,"units":"f"}', function_call=None, - parsed=Location(city='San Francisco', temperature=68.0, units='f'), + parsed=Location(city='San Francisco', temperature=59.0, units='f'), refusal=None, role='assistant', tool_calls=[] @@ -367,7 +367,7 @@ class Location(BaseModel): max_tokens=1, response_format=Location, ), - content_snapshot=snapshot(external("7cb5136bff92*.bin")), + content_snapshot=snapshot(external("4cc50a6135d2*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -391,13 +391,13 @@ class Location(BaseModel): ], response_format=Location, ), - content_snapshot=snapshot(external("831699086ad4*.bin")), + content_snapshot=snapshot(external("173417d55340*.bin")), mock_client=client, respx_mock=respx_mock, ) assert print_obj(listener.get_event_by_type("refusal.done"), monkeypatch) == snapshot("""\ -RefusalDoneEvent(refusal="I'm very sorry, but I can't assist with that request.", type='refusal.done') +RefusalDoneEvent(refusal="I'm sorry, I can't assist with that request.", type='refusal.done') """) assert print_obj(listener.stream.get_final_completion().choices, monkeypatch) == snapshot( @@ -411,7 +411,7 @@ class Location(BaseModel): content=None, function_call=None, parsed=None, - refusal="I'm very sorry, but I can't assist with that request.", + refusal="I'm sorry, I can't assist with that request.", role='assistant', tool_calls=[] ) @@ -434,7 +434,7 @@ def test_content_logprobs_events(client: OpenAI, respx_mock: MockRouter, monkeyp ], logprobs=True, ), - content_snapshot=snapshot(external("c2bbcc5b1897*.bin")), + content_snapshot=snapshot(external("83b060bae42e*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -442,22 +442,26 @@ def test_content_logprobs_events(client: OpenAI, respx_mock: MockRouter, monkeyp assert print_obj([e for e in listener.events if e.type.startswith("logprobs")], monkeypatch) == snapshot("""\ [ LogprobsContentDeltaEvent( - content=[ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.00867213, token='Foo', top_logprobs=[])], - snapshot=[ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.00867213, token='Foo', top_logprobs=[])], + content=[ + ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.0025094282, token='Foo', top_logprobs=[]) + ], + snapshot=[ + ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.0025094282, token='Foo', top_logprobs=[]) + ], type='logprobs.content.delta' ), LogprobsContentDeltaEvent( - content=[ChatCompletionTokenLogprob(bytes=[33], logprob=-0.19675663, token='!', top_logprobs=[])], + content=[ChatCompletionTokenLogprob(bytes=[33], logprob=-0.26638845, token='!', top_logprobs=[])], snapshot=[ - ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.00867213, token='Foo', top_logprobs=[]), - ChatCompletionTokenLogprob(bytes=[33], logprob=-0.19675663, token='!', top_logprobs=[]) + ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.0025094282, token='Foo', top_logprobs=[]), + ChatCompletionTokenLogprob(bytes=[33], logprob=-0.26638845, token='!', top_logprobs=[]) ], type='logprobs.content.delta' ), LogprobsContentDoneEvent( content=[ - ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.00867213, token='Foo', top_logprobs=[]), - ChatCompletionTokenLogprob(bytes=[33], logprob=-0.19675663, token='!', top_logprobs=[]) + ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.0025094282, token='Foo', top_logprobs=[]), + ChatCompletionTokenLogprob(bytes=[33], logprob=-0.26638845, token='!', top_logprobs=[]) ], type='logprobs.content.done' ) @@ -471,8 +475,8 @@ def test_content_logprobs_events(client: OpenAI, respx_mock: MockRouter, monkeyp index=0, logprobs=ChoiceLogprobs( content=[ - ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.00867213, token='Foo', top_logprobs=[]), - ChatCompletionTokenLogprob(bytes=[33], logprob=-0.19675663, token='!', top_logprobs=[]) + ChatCompletionTokenLogprob(bytes=[70, 111, 111], logprob=-0.0025094282, token='Foo', top_logprobs=[]), + ChatCompletionTokenLogprob(bytes=[33], logprob=-0.26638845, token='!', top_logprobs=[]) ], refusal=None ), @@ -508,7 +512,7 @@ class Location(BaseModel): logprobs=True, response_format=Location, ), - content_snapshot=snapshot(external("2672a71c7793*.bin")), + content_snapshot=snapshot(external("569c877e6942*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -541,49 +545,49 @@ class Location(BaseModel): ChatCompletionTokenLogprob(bytes=[73, 39, 109], logprob=-0.0012038043, token="I'm", top_logprobs=[]), ChatCompletionTokenLogprob( bytes=[32, 118, 101, 114, 121], - logprob=-0.7845193, + logprob=-0.8438816, token=' very', top_logprobs=[] ), ChatCompletionTokenLogprob( bytes=[32, 115, 111, 114, 114, 121], - logprob=-8.537869e-06, + logprob=-3.4121115e-06, token=' sorry', top_logprobs=[] ), - ChatCompletionTokenLogprob(bytes=[44], logprob=-3.0828953e-05, token=',', top_logprobs=[]), + ChatCompletionTokenLogprob(bytes=[44], logprob=-3.3809047e-05, token=',', top_logprobs=[]), ChatCompletionTokenLogprob( bytes=[32, 98, 117, 116], - logprob=-0.029754885, + logprob=-0.038048144, token=' but', top_logprobs=[] ), - ChatCompletionTokenLogprob(bytes=[32, 73], logprob=-0.0018191704, token=' I', top_logprobs=[]), + ChatCompletionTokenLogprob(bytes=[32, 73], logprob=-0.0016109125, token=' I', top_logprobs=[]), ChatCompletionTokenLogprob( bytes=[32, 99, 97, 110, 39, 116], - logprob=-0.0114746485, + logprob=-0.0073532974, token=" can't", top_logprobs=[] ), ChatCompletionTokenLogprob( bytes=[32, 97, 115, 115, 105, 115, 116], - logprob=-0.0023167727, + logprob=-0.0020837625, token=' assist', top_logprobs=[] ), ChatCompletionTokenLogprob( bytes=[32, 119, 105, 116, 104], - logprob=-0.0052390876, + logprob=-0.00318354, token=' with', top_logprobs=[] ), ChatCompletionTokenLogprob( bytes=[32, 116, 104, 97, 116], - logprob=-0.0016676846, + logprob=-0.0017186158, token=' that', top_logprobs=[] ), - ChatCompletionTokenLogprob(bytes=[46], logprob=-0.63433325, token='.', top_logprobs=[]) + ChatCompletionTokenLogprob(bytes=[46], logprob=-0.57687104, token='.', top_logprobs=[]) ] ), message=ParsedChatCompletionMessage[Location]( @@ -619,7 +623,7 @@ class GetWeatherArgs(BaseModel): openai.pydantic_function_tool(GetWeatherArgs), ], ), - content_snapshot=snapshot(external("78eb8762cd28*.bin")), + content_snapshot=snapshot(external("c6aa7e397b71*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -644,7 +648,7 @@ class GetWeatherArgs(BaseModel): name='GetWeatherArgs', parsed_arguments=GetWeatherArgs(city='Edinburgh', country='UK', units='c') ), - id='call_GaxOHx7TMW5ozlqDe64MlazG', + id='call_c91SqDXlYFuETYv8mUHzz6pp', index=0, type='function' ) @@ -675,7 +679,7 @@ class GetWeatherArgs(BaseModel): name='GetWeatherArgs', parsed_arguments=GetWeatherArgs(city='Edinburgh', country='UK', units='c') ), - id='call_GaxOHx7TMW5ozlqDe64MlazG', + id='call_c91SqDXlYFuETYv8mUHzz6pp', index=0, type='function' ) @@ -720,7 +724,7 @@ class GetStockPrice(BaseModel): ), ], ), - content_snapshot=snapshot(external("80e47fe8b714*.bin")), + content_snapshot=snapshot(external("f82268f2fefd*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -741,11 +745,11 @@ class GetStockPrice(BaseModel): tool_calls=[ ParsedFunctionToolCall( function=ParsedFunction( - arguments='{"city": "Edinburgh", "country": "UK", "units": "c"}', + arguments='{"city": "Edinburgh", "country": "GB", "units": "c"}', name='GetWeatherArgs', - parsed_arguments=GetWeatherArgs(city='Edinburgh', country='UK', units='c') + parsed_arguments=GetWeatherArgs(city='Edinburgh', country='GB', units='c') ), - id='call_DUIfURCaEhuke5aUHUG9drKQ', + id='call_JMW1whyEaYG438VE1OIflxA2', index=0, type='function' ), @@ -755,7 +759,7 @@ class GetStockPrice(BaseModel): name='get_stock_price', parsed_arguments=GetStockPrice(exchange='NASDAQ', ticker='AAPL') ), - id='call_bxtBSMiFZj9tpEEoR2HvbYAV', + id='call_DNYTawLBoN8fj3KN6qU9N1Ou', index=1, type='function' ) @@ -771,11 +775,11 @@ class GetStockPrice(BaseModel): [ ParsedFunctionToolCall( function=ParsedFunction( - arguments='{"city": "Edinburgh", "country": "UK", "units": "c"}', + arguments='{"city": "Edinburgh", "country": "GB", "units": "c"}', name='GetWeatherArgs', - parsed_arguments=GetWeatherArgs(city='Edinburgh', country='UK', units='c') + parsed_arguments=GetWeatherArgs(city='Edinburgh', country='GB', units='c') ), - id='call_DUIfURCaEhuke5aUHUG9drKQ', + id='call_JMW1whyEaYG438VE1OIflxA2', index=0, type='function' ), @@ -785,7 +789,7 @@ class GetStockPrice(BaseModel): name='get_stock_price', parsed_arguments=GetStockPrice(exchange='NASDAQ', ticker='AAPL') ), - id='call_bxtBSMiFZj9tpEEoR2HvbYAV', + id='call_DNYTawLBoN8fj3KN6qU9N1Ou', index=1, type='function' ) @@ -827,7 +831,7 @@ def test_parse_strict_tools(client: OpenAI, respx_mock: MockRouter, monkeypatch: } ], ), - content_snapshot=snapshot(external("04fbc4717b37*.bin")), + content_snapshot=snapshot(external("a247c49c5fcd*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -852,7 +856,7 @@ def test_parse_strict_tools(client: OpenAI, respx_mock: MockRouter, monkeypatch: name='get_weather', parsed_arguments={'city': 'San Francisco', 'state': 'CA'} ), - id='call_nZUB8dEnPSMykLtTKRRS3sT8', + id='call_CTf1nWJLqSeRgDqaCG27xZ74', index=0, type='function' ) @@ -877,7 +881,7 @@ def test_non_pydantic_response_format(client: OpenAI, respx_mock: MockRouter, mo ], response_format={"type": "json_object"}, ), - content_snapshot=snapshot(external("56dbdd87d96d*.bin")), + content_snapshot=snapshot(external("d61558011839*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -890,8 +894,12 @@ def test_non_pydantic_response_format(client: OpenAI, respx_mock: MockRouter, mo index=0, logprobs=None, message=ParsedChatCompletionMessage[NoneType]( - content='\\n\\n\\n\\n\\n{\\n "error": "I\\'m unable to provide real-time weather information. Please check a -weather website or app for the current conditions in San Francisco."\\n}', + content='\\n {\\n "location": "San Francisco, CA",\\n "weather": {\\n "temperature": "18°C",\\n +"condition": "Partly Cloudy",\\n "humidity": "72%",\\n "windSpeed": "15 km/h",\\n "windDirection": "NW"\\n +},\\n "forecast": [\\n {\\n "day": "Monday",\\n "high": "20°C",\\n "low": "14°C",\\n +"condition": "Sunny"\\n },\\n {\\n "day": "Tuesday",\\n "high": "19°C",\\n "low": "15°C",\\n +"condition": "Mostly Cloudy"\\n },\\n {\\n "day": "Wednesday",\\n "high": "18°C",\\n "low": +"14°C",\\n "condition": "Cloudy"\\n }\\n ]\\n }\\n', function_call=None, parsed=None, refusal=None, @@ -922,7 +930,7 @@ def test_allows_non_strict_tools_but_no_parsing( } ], ), - content_snapshot=snapshot(external("1f7bdb779714*.bin")), + content_snapshot=snapshot(external("2018feb66ae1*.bin")), mock_client=client, respx_mock=respx_mock, ) @@ -957,7 +965,7 @@ def test_allows_non_strict_tools_but_no_parsing( name='get_weather', parsed_arguments=None ), - id='call_2NCpRQ3wEuK4kOH1budBUmZv', + id='call_4XzlGBLtUe9dy3GVNV4jhq7h', index=0, type='function' ) From 15a5cfaea2f7e58bfea8587df915a82d78098759 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Thu, 26 Sep 2024 18:25:53 -0400 Subject: [PATCH 4/6] add tests back --- tests/lib/chat/test_completions.py | 177 ++++++++++++++++++++++++++++- 1 file changed, 176 insertions(+), 1 deletion(-) diff --git a/tests/lib/chat/test_completions.py b/tests/lib/chat/test_completions.py index d66630fa3a..7702a98d49 100644 --- a/tests/lib/chat/test_completions.py +++ b/tests/lib/chat/test_completions.py @@ -3,7 +3,7 @@ import os import json from enum import Enum -from typing import Any, List, Callable, Optional +from typing import Any, List, Callable, Optional, Awaitable from typing_extensions import Literal, TypeVar import httpx @@ -773,6 +773,139 @@ def test_parse_non_strict_tools(client: OpenAI) -> None: ) +@pytest.mark.respx(base_url=base_url) +def test_parse_pydantic_raw_response(client: OpenAI, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch) -> None: + class Location(BaseModel): + city: str + temperature: float + units: Literal["c", "f"] + + response = _make_snapshot_request( + lambda c: c.beta.chat.completions.with_raw_response.parse( + model="gpt-4o-2024-08-06", + messages=[ + { + "role": "user", + "content": "What's the weather like in SF?", + }, + ], + response_format=Location, + ), + content_snapshot=snapshot( + '{"id": "chatcmpl-ABrDYCa8W1w66eUxKDO8TQF1m6trT", "object": "chat.completion", "created": 1727389540, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":58,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' + ), + mock_client=client, + respx_mock=respx_mock, + ) + assert response.http_request.headers.get("x-stainless-helper-method") == "beta.chat.completions.parse" + + completion = response.parse() + message = completion.choices[0].message + assert message.parsed is not None + assert isinstance(message.parsed.city, str) + assert print_obj(completion, monkeypatch) == snapshot( + """\ +ParsedChatCompletion[Location]( + choices=[ + ParsedChoice[Location]( + finish_reason='stop', + index=0, + logprobs=None, + message=ParsedChatCompletionMessage[Location]( + content='{"city":"San Francisco","temperature":58,"units":"f"}', + function_call=None, + parsed=Location(city='San Francisco', temperature=58.0, units='f'), + refusal=None, + role='assistant', + tool_calls=[] + ) + ) + ], + created=1727389540, + id='chatcmpl-ABrDYCa8W1w66eUxKDO8TQF1m6trT', + model='gpt-4o-2024-08-06', + object='chat.completion', + service_tier=None, + system_fingerprint='fp_5050236cbd', + usage=CompletionUsage( + completion_tokens=14, + completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), + prompt_tokens=79, + total_tokens=93 + ) +) +""" + ) + + +@pytest.mark.respx(base_url=base_url) +@pytest.mark.asyncio +async def test_async_parse_pydantic_raw_response( + async_client: AsyncOpenAI, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch +) -> None: + class Location(BaseModel): + city: str + temperature: float + units: Literal["c", "f"] + + response = await _make_async_snapshot_request( + lambda c: c.beta.chat.completions.with_raw_response.parse( + model="gpt-4o-2024-08-06", + messages=[ + { + "role": "user", + "content": "What's the weather like in SF?", + }, + ], + response_format=Location, + ), + content_snapshot=snapshot( + '{"id": "chatcmpl-ABrDQWOiw0PK5JOsxl1D9ooeQgznq", "object": "chat.completion", "created": 1727389532, "model": "gpt-4o-2024-08-06", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\\"city\\":\\"San Francisco\\",\\"temperature\\":65,\\"units\\":\\"f\\"}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 79, "completion_tokens": 14, "total_tokens": 93, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_5050236cbd"}' + ), + mock_client=async_client, + respx_mock=respx_mock, + ) + assert response.http_request.headers.get("x-stainless-helper-method") == "beta.chat.completions.parse" + + completion = response.parse() + message = completion.choices[0].message + assert message.parsed is not None + assert isinstance(message.parsed.city, str) + assert print_obj(completion, monkeypatch) == snapshot( + """\ +ParsedChatCompletion[Location]( + choices=[ + ParsedChoice[Location]( + finish_reason='stop', + index=0, + logprobs=None, + message=ParsedChatCompletionMessage[Location]( + content='{"city":"San Francisco","temperature":65,"units":"f"}', + function_call=None, + parsed=Location(city='San Francisco', temperature=65.0, units='f'), + refusal=None, + role='assistant', + tool_calls=[] + ) + ) + ], + created=1727389532, + id='chatcmpl-ABrDQWOiw0PK5JOsxl1D9ooeQgznq', + model='gpt-4o-2024-08-06', + object='chat.completion', + service_tier=None, + system_fingerprint='fp_5050236cbd', + usage=CompletionUsage( + completion_tokens=14, + completion_tokens_details=CompletionTokensDetails(reasoning_tokens=0), + prompt_tokens=79, + total_tokens=93 + ) +) +""" + ) + + @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) def test_parse_method_in_sync(sync: bool, client: OpenAI, async_client: AsyncOpenAI) -> None: checking_client: OpenAI | AsyncOpenAI = client if sync else async_client @@ -824,3 +957,45 @@ def _on_response(response: httpx.Response) -> None: client.close() return result + + +async def _make_async_snapshot_request( + func: Callable[[AsyncOpenAI], Awaitable[_T]], + *, + content_snapshot: Any, + respx_mock: MockRouter, + mock_client: AsyncOpenAI, +) -> _T: + live = os.environ.get("OPENAI_LIVE") == "1" + if live: + + async def _on_response(response: httpx.Response) -> None: + # update the content snapshot + assert json.dumps(json.loads(await response.aread())) == content_snapshot + + respx_mock.stop() + + client = AsyncOpenAI( + http_client=httpx.AsyncClient( + event_hooks={ + "response": [_on_response], + } + ) + ) + else: + respx_mock.post("/chat/completions").mock( + return_value=httpx.Response( + 200, + content=content_snapshot._old_value, + headers={"content-type": "application/json"}, + ) + ) + + client = mock_client + + result = await func(client) + + if live: + await client.close() + + return result From 46fb7fbf363fcf1604ad091f0d1839082a6d3458 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Thu, 26 Sep 2024 18:26:09 -0400 Subject: [PATCH 5/6] tmp for ci --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de70348b9c..f02c75dc7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: pull_request: branches: - main + - next jobs: lint: From a24c15afac5e491e9d6ef3305065073122ce707e Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Thu, 26 Sep 2024 18:31:23 -0400 Subject: [PATCH 6/6] Revert "tmp for ci" This reverts commit 46fb7fbf363fcf1604ad091f0d1839082a6d3458. --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f02c75dc7c..de70348b9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,6 @@ on: pull_request: branches: - main - - next jobs: lint: