From 03b6c57627b8709c167a287f00ed2eb3da776f74 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Fri, 8 Nov 2024 14:30:33 +0200 Subject: [PATCH 01/20] add myself to component owners --- .github/component_owners.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index 3aeb90b297..79acc074a7 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -73,3 +73,4 @@ components: - lzchen - gyliu513 - nirga + - alizenhom From 1be4a6bc9bc3f022353a068e58c241eb59797e34 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Fri, 8 Nov 2024 14:57:53 +0200 Subject: [PATCH 02/20] add async support --- .../instrumentation/openai_v2/__init__.py | 11 ++- .../instrumentation/openai_v2/patch.py | 86 +++++++++++++++---- .../instrumentation/openai_v2/utils.py | 21 ++++- 3 files changed, 99 insertions(+), 19 deletions(-) diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py index e8a782e404..ee3bbfdb73 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py @@ -52,7 +52,7 @@ from opentelemetry.semconv.schemas import Schemas from opentelemetry.trace import get_tracer -from .patch import chat_completions_create +from .patch import async_chat_completions_create, chat_completions_create class OpenAIInstrumentor(BaseInstrumentor): @@ -84,7 +84,16 @@ def _instrument(self, **kwargs): ), ) + wrap_function_wrapper( + module="openai.resources.chat.completions", + name="AsyncCompletions.create", + wrapper=async_chat_completions_create( + tracer, event_logger, is_content_enabled() + ), + ) + def _uninstrument(self, **kwargs): import openai # pylint: disable=import-outside-toplevel unwrap(openai.resources.chat.completions.Completions, "create") + unwrap(openai.resources.chat.completions.AsyncCompletions, "create") diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py index 8540bff219..cd284473ce 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py @@ -21,15 +21,12 @@ from opentelemetry.semconv._incubating.attributes import ( gen_ai_attributes as GenAIAttributes, ) -from opentelemetry.semconv.attributes import ( - error_attributes as ErrorAttributes, -) from opentelemetry.trace import Span, SpanKind, Tracer -from opentelemetry.trace.status import Status, StatusCode from .utils import ( choice_to_event, get_llm_request_attributes, + handle_span_exception, is_streaming, message_to_event, set_span_attribute, @@ -72,12 +69,49 @@ def traced_method(wrapped, instance, args, kwargs): return result except Exception as error: - span.set_status(Status(StatusCode.ERROR, str(error))) + handle_span_exception(span, error) + raise + + return traced_method + + +def async_chat_completions_create( + tracer: Tracer, event_logger: EventLogger, capture_content: bool +): + """Wrap the `create` method of the `AsyncChatCompletion` class to trace it.""" + + async def traced_method(wrapped, instance, args, kwargs): + span_attributes = {**get_llm_request_attributes(kwargs, instance)} + + span_name = f"{span_attributes[GenAIAttributes.GEN_AI_OPERATION_NAME]} {span_attributes[GenAIAttributes.GEN_AI_REQUEST_MODEL]}" + with tracer.start_as_current_span( + name=span_name, + kind=SpanKind.CLIENT, + attributes=span_attributes, + end_on_exit=False, + ) as span: + if span.is_recording(): + for message in kwargs.get("messages", []): + event_logger.emit( + message_to_event(message, capture_content) + ) + + try: + result = await wrapped(*args, **kwargs) + if is_streaming(kwargs): + return StreamWrapper( + result, span, event_logger, capture_content + ) + if span.is_recording(): - span.set_attribute( - ErrorAttributes.ERROR_TYPE, type(error).__qualname__ + _set_response_attributes( + span, result, event_logger, capture_content ) span.end() + return result + + except Exception as error: + handle_span_exception(span, error) raise return traced_method @@ -286,10 +320,19 @@ def __enter__(self): def __exit__(self, exc_type, exc_val, exc_tb): try: if exc_type is not None: - self.span.set_status(Status(StatusCode.ERROR, str(exc_val))) - self.span.set_attribute( - ErrorAttributes.ERROR_TYPE, exc_type.__qualname__ - ) + handle_span_exception(self.span, exc_val) + finally: + self.cleanup() + return False # Propagate the exception + + async def __aenter__(self): + self.setup() + return self + + async def __aexit__(self, exc_type, exc_val, exc_tb): + try: + if exc_type is not None: + handle_span_exception(self.span, exc_val) finally: self.cleanup() return False # Propagate the exception @@ -301,6 +344,9 @@ def close(self): def __iter__(self): return self + def __aiter__(self): + return self + def __next__(self): try: chunk = next(self.stream) @@ -310,10 +356,20 @@ def __next__(self): self.cleanup() raise except Exception as error: - self.span.set_status(Status(StatusCode.ERROR, str(error))) - self.span.set_attribute( - ErrorAttributes.ERROR_TYPE, type(error).__qualname__ - ) + handle_span_exception(self.span, error) + self.cleanup() + raise + + async def __anext__(self): + try: + chunk = await self.stream.__anext__() + self.process_chunk(chunk) + return chunk + except StopAsyncIteration: + self.cleanup() + raise + except Exception as error: + handle_span_exception(self.span, error) self.cleanup() raise diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py index a3a2d317ce..cf920c17ee 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py @@ -26,6 +26,10 @@ from opentelemetry.semconv._incubating.attributes import ( server_attributes as ServerAttributes, ) +from opentelemetry.semconv.attributes import ( + error_attributes as ErrorAttributes, +) +from opentelemetry.trace.status import Status, StatusCode OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT = ( "OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT" @@ -138,9 +142,11 @@ def choice_to_event(choice, capture_content): if choice.message: message = { - "role": choice.message.role - if choice.message and choice.message.role - else None + "role": ( + choice.message.role + if choice.message and choice.message.role + else None + ) } tool_calls = extract_tool_calls(choice.message, capture_content) if tool_calls: @@ -210,3 +216,12 @@ def get_llm_request_attributes( # filter out None values return {k: v for k, v in attributes.items() if v is not None} + + +def handle_span_exception(span, error): + span.set_status(Status(StatusCode.ERROR, str(error))) + if span.is_recording(): + span.set_attribute( + ErrorAttributes.ERROR_TYPE, type(error).__qualname__ + ) + span.end() From acdf2f266692f55db94c7f655a9d06a9d3e92481 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Fri, 8 Nov 2024 15:39:25 +0200 Subject: [PATCH 03/20] add async tests --- .../test-requirements-0.txt | 1 + .../test-requirements-1.txt | 1 + .../test_async_chat_completion_404.yaml | 73 ++ ...st_async_chat_completion_extra_params.yaml | 98 ++ ...sync_chat_completion_multiple_choices.yaml | 100 +++ ...completion_multiple_choices_streaming.yaml | 480 ++++++++++ ...n_multiple_tools_streaming_no_content.yaml | 153 ++++ ...multiple_tools_streaming_with_content.yaml | 153 ++++ .../test_async_chat_completion_streaming.yaml | 115 +++ ...hat_completion_streaming_not_complete.yaml | 112 +++ ...st_async_chat_completion_with_content.yaml | 97 ++ .../tests/conftest.py | 7 +- .../tests/test_async_chat_completions.py | 847 ++++++++++++++++++ 13 files changed, 2236 insertions(+), 1 deletion(-) create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-0.txt b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-0.txt index 7a15734872..5e1693b69a 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-0.txt +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-0.txt @@ -5,6 +5,7 @@ importlib-metadata==6.11.0 packaging==24.0 pytest==7.4.4 pytest-vcr==1.0.2 +pytest-asyncio==0.21.0 wrapt==1.16.0 opentelemetry-api==1.28 # when updating, also update in pyproject.toml opentelemetry-sdk==1.28 # when updating, also update in pyproject.toml diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-1.txt b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-1.txt index ded849c8ee..618410edd3 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-1.txt +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-1.txt @@ -5,6 +5,7 @@ importlib-metadata==6.11.0 packaging==24.0 pytest==7.4.4 pytest-vcr==1.0.2 +pytest-asyncio==0.21.0 wrapt==1.16.0 # test with the latest version of opentelemetry-api, sdk, and semantic conventions diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml new file mode 100644 index 0000000000..d21ef48ac7 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml @@ -0,0 +1,73 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": + "this-model-does-not-exist"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '103' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"error\": {\n \"message\": \"The model `this-model-does-not-exist` + does not exist or you do not have access to it.\",\n \"type\": \"invalid_request_error\",\n + \ \"param\": null,\n \"code\": \"model_not_found\"\n }\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5e31d6e45e284-MRS + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 08 Nov 2024 13:25:06 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '231' + openai-organization: test_organization + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + vary: + - Origin + x-request-id: + - req_82c60ab486740fa07db9b846df2d532b + status: + code: 404 + message: Not Found +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml new file mode 100644 index 0000000000..18dd64f971 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml @@ -0,0 +1,98 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": + "gpt-4o-mini", "max_tokens": 50, "seed": 42, "stream": false, "temperature": + 0.5, "service_tier": "default"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '183' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJJHh1NYn4MAJ5vmO2u6MC0QWvS3\",\n \"object\": + \"chat.completion\",\n \"created\": 1731072447,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"This is a test. How can I assist you + further?\",\n \"refusal\": null\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 12,\n \"completion_tokens\": 12,\n \"total_tokens\": 24,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_0ba0d124f1\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5e68e7df7e20d-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:27:28 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '825' + openai-organization: test_organization + openai-processing-ms: + - '373' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999943' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_bea7292421fe218c0a9e158dbb7699d7 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml new file mode 100644 index 0000000000..803216aa1b --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml @@ -0,0 +1,100 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": + "gpt-4o-mini", "n": 2, "stream": false}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '114' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJJITAE6LSpkhJ4F6Lkgx1hjMWce\",\n \"object\": + \"chat.completion\",\n \"created\": 1731072448,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"This is a test.\",\n \"refusal\": + null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n + \ },\n {\n \"index\": 1,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"This is a test. How can I assist you + further?\",\n \"refusal\": null\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 12,\n \"completion_tokens\": 17,\n \"total_tokens\": 29,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": + \"fp_9b78b61c52\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5e692e8c9129a-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:27:29 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '1000' + openai-organization: test_organization + openai-processing-ms: + - '404' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999962' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_7d77cf85328e6feb1d9c2d52f2a69cfb + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml new file mode 100644 index 0000000000..3ebcfc9909 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml @@ -0,0 +1,480 @@ +interactions: +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}], "model": "gpt-4o-mini", "n": 2, "stream": true, "stream_options": + {"include_usage": true}}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '254' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"I"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"I''m"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + don''t"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + sorry"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + have"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + real"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + but"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + I"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + capabilities"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + to"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + check"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + don''t"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + have"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + access"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + to"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + current"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + real"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + data"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + However"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + including"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + I"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + current"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + recommend"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + checking"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + updates"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + reliable"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + I"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + recommend"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + website"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + checking"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + or"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + app"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + reliable"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + for"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + website"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + latest"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + or"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + app"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + updates"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + for"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + in"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + latest"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + and"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + forecasts"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + San"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + for"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + and"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + Websites"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + San"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + like"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + Weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":".com"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + National"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + Weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + Service"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + or"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + apps"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + on"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + your"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + smartphone"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + should"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + provide"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + you"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + with"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + accurate"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + and"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + up"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-to"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-date"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + information"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":26,"completion_tokens":98,"total_tokens":124,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5ea1bbe311858-MRS + Connection: + - keep-alive + Content-Type: + - text/event-stream; charset=utf-8 + Date: + - Fri, 08 Nov 2024 13:29:53 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + openai-organization: test_organization + openai-processing-ms: + - '141' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999945' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_7e5fb27046bd51744452679772149d45 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml new file mode 100644 index 0000000000..b09e1ceb9f --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml @@ -0,0 +1,153 @@ +interactions: +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}], "model": "gpt-4o-mini", "stream": true, "stream_options": {"include_usage": + true}, "tool_choice": "auto", "tools": [{"type": "function", "function": {"name": + "get_current_weather", "description": "Get the current weather in a given location", + "parameters": {"type": "object", "properties": {"location": {"type": "string", + "description": "The city and state, e.g. Boston, MA"}}, "required": ["location"], + "additionalProperties": false}}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '602' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_5Maqr8qm7jHMMZLQEtaeQZ7E","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": + \"S"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, + W"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_Tfs3ahuPFNggkm8nBav8YkLm","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": + \"S"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an + F"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, + C"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5ea2f9dd16404-LHR + Connection: + - keep-alive + Content-Type: + - text/event-stream; charset=utf-8 + Date: + - Fri, 08 Nov 2024 13:29:57 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + openai-organization: test_organization + openai-processing-ms: + - '897' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999960' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_443646b762c7e28f71ae8700526e59a6 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml new file mode 100644 index 0000000000..bee1ef60c3 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml @@ -0,0 +1,153 @@ +interactions: +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}], "model": "gpt-4o-mini", "stream": true, "stream_options": {"include_usage": + true}, "tool_choice": "auto", "tools": [{"type": "function", "function": {"name": + "get_current_weather", "description": "Get the current weather in a given location", + "parameters": {"type": "object", "properties": {"location": {"type": "string", + "description": "The city and state, e.g. Boston, MA"}}, "required": ["location"], + "additionalProperties": false}}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '602' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_qVaxkDwCBrNXL42bTYTo4OXj","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": + \"S"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, + W"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_imlAeCj1ZENGXNHEaK19vqhy","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": + \"S"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an + F"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, + C"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5ea276ada35db-LHR + Connection: + - keep-alive + Content-Type: + - text/event-stream; charset=utf-8 + Date: + - Fri, 08 Nov 2024 13:29:56 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + openai-organization: test_organization + openai-processing-ms: + - '920' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999960' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_85256ce49f10bf2d4c5d78674bfd758c + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml new file mode 100644 index 0000000000..2abc823bcd --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": + "gpt-4", "stream": true, "stream_options": {"include_usage": true}}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '142' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + is"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + test"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":12,"completion_tokens":5,"total_tokens":17,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5ea117b83e1c1-MRS + Connection: + - keep-alive + Content-Type: + - text/event-stream; charset=utf-8 + Date: + - Fri, 08 Nov 2024 13:29:51 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + openai-organization: test_organization + openai-processing-ms: + - '223' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '10000' + x-ratelimit-limit-tokens: + - '1000000' + x-ratelimit-remaining-requests: + - '9999' + x-ratelimit-remaining-tokens: + - '999977' + x-ratelimit-reset-requests: + - 6ms + x-ratelimit-reset-tokens: + - 1ms + x-request-id: + - req_6a1af35b7398ed9b756594f928112eef + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml new file mode 100644 index 0000000000..e1f31e1a33 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml @@ -0,0 +1,112 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": + "gpt-4", "stream": true}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '99' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + is"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + test"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5ea161a645fac-MRS + Connection: + - keep-alive + Content-Type: + - text/event-stream; charset=utf-8 + Date: + - Fri, 08 Nov 2024 13:29:52 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + openai-organization: test_organization + openai-processing-ms: + - '335' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '10000' + x-ratelimit-limit-tokens: + - '1000000' + x-ratelimit-remaining-requests: + - '9999' + x-ratelimit-remaining-tokens: + - '999977' + x-ratelimit-reset-requests: + - 6ms + x-ratelimit-reset-tokens: + - 1ms + x-request-id: + - req_8ea7fd338691ba6019e8467ff1abdd27 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml new file mode 100644 index 0000000000..86cbfa5dbd --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml @@ -0,0 +1,97 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": + "gpt-4o-mini", "stream": false}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '106' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJChxt2fA6Qwd9jsTvVLvEQerDGZ\",\n \"object\": + \"chat.completion\",\n \"created\": 1731072039,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"This is a test.\",\n \"refusal\": + null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n + \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 12,\n \"completion_tokens\": + 5,\n \"total_tokens\": 17,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": + \"fp_0ba0d124f1\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5dc968fb4e1ac-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:20:40 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '765' + openai-organization: test_organization + openai-processing-ms: + - '327' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999978' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_337e4834bfba3e14ca642a4ffd6d83b6 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py index 84a9bf2692..6effd8a8d1 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py @@ -5,7 +5,7 @@ import pytest import yaml -from openai import OpenAI +from openai import AsyncOpenAI, OpenAI from opentelemetry.instrumentation.openai_v2 import OpenAIInstrumentor from opentelemetry.instrumentation.openai_v2.utils import ( @@ -63,6 +63,11 @@ def openai_client(): return OpenAI() +@pytest.fixture +def async_openai_client(): + return AsyncOpenAI() + + @pytest.fixture(scope="module") def vcr_config(): return { diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py new file mode 100644 index 0000000000..01ad704b45 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py @@ -0,0 +1,847 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# pylint: disable=too-many-locals + +from typing import Optional + +import pytest +from openai import APIConnectionError, AsyncOpenAI, NotFoundError +from openai.resources.chat.completions import ChatCompletion + +from opentelemetry.sdk.trace import ReadableSpan +from opentelemetry.semconv._incubating.attributes import ( + error_attributes as ErrorAttributes, +) +from opentelemetry.semconv._incubating.attributes import ( + event_attributes as EventAttributes, +) +from opentelemetry.semconv._incubating.attributes import ( + gen_ai_attributes as GenAIAttributes, +) +from opentelemetry.semconv._incubating.attributes import ( + server_attributes as ServerAttributes, +) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_with_content( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + response = await async_openai_client.chat.completions.create( + messages=messages_value, model=llm_model_value, stream=False + ) + + spans = span_exporter.get_finished_spans() + assert_completion_attributes(spans[0], llm_model_value, response) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 2 + + user_message = {"content": messages_value[0]["content"]} + assert_message_in_logs( + logs[0], "gen_ai.user.message", user_message, spans[0] + ) + + choice_event = { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": response.choices[0].message.content, + }, + } + assert_message_in_logs(logs[1], "gen_ai.choice", choice_event, spans[0]) + + +@pytest.mark.asyncio() +async def test_async_chat_completion_bad_endpoint( + span_exporter, instrument_no_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + client = AsyncOpenAI(base_url="http://localhost:4242") + + with pytest.raises(APIConnectionError): + await client.chat.completions.create( + messages=messages_value, + model=llm_model_value, + timeout=0.1, + ) + + spans = span_exporter.get_finished_spans() + assert_all_attributes( + spans[0], llm_model_value, server_address="localhost" + ) + assert 4242 == spans[0].attributes[ServerAttributes.SERVER_PORT] + assert ( + "APIConnectionError" == spans[0].attributes[ErrorAttributes.ERROR_TYPE] + ) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_404( + span_exporter, async_openai_client, instrument_no_content +): + llm_model_value = "this-model-does-not-exist" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + with pytest.raises(NotFoundError): + await async_openai_client.chat.completions.create( + messages=messages_value, + model=llm_model_value, + ) + + spans = span_exporter.get_finished_spans() + + assert_all_attributes(spans[0], llm_model_value) + assert "NotFoundError" == spans[0].attributes[ErrorAttributes.ERROR_TYPE] + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_extra_params( + span_exporter, async_openai_client, instrument_no_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + response = await async_openai_client.chat.completions.create( + messages=messages_value, + model=llm_model_value, + seed=42, + temperature=0.5, + max_tokens=50, + stream=False, + extra_body={"service_tier": "default"}, + ) + + spans = span_exporter.get_finished_spans() + assert_completion_attributes(spans[0], llm_model_value, response) + assert ( + spans[0].attributes[GenAIAttributes.GEN_AI_OPENAI_REQUEST_SEED] == 42 + ) + assert ( + spans[0].attributes[GenAIAttributes.GEN_AI_REQUEST_TEMPERATURE] == 0.5 + ) + assert spans[0].attributes[GenAIAttributes.GEN_AI_REQUEST_MAX_TOKENS] == 50 + assert ( + spans[0].attributes[GenAIAttributes.GEN_AI_OPENAI_REQUEST_SERVICE_TIER] + == "default" + ) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_multiple_choices( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + response = await async_openai_client.chat.completions.create( + messages=messages_value, model=llm_model_value, n=2, stream=False + ) + + spans = span_exporter.get_finished_spans() + assert_completion_attributes(spans[0], llm_model_value, response) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 3 # 1 user message + 2 choice messages + + user_message = {"content": messages_value[0]["content"]} + assert_message_in_logs( + logs[0], "gen_ai.user.message", user_message, spans[0] + ) + + choice_event_0 = { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": response.choices[0].message.content, + }, + } + assert_message_in_logs(logs[1], "gen_ai.choice", choice_event_0, spans[0]) + + choice_event_1 = { + "index": 1, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": response.choices[1].message.content, + }, + } + assert_message_in_logs(logs[2], "gen_ai.choice", choice_event_1, spans[0]) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_tool_calls_with_content( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + chat_completion_tool_call( + span_exporter, log_exporter, async_openai_client, True + ) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_tool_calls_no_content( + span_exporter, log_exporter, async_openai_client, instrument_no_content +): + chat_completion_tool_call( + span_exporter, log_exporter, async_openai_client, False + ) + + +async def chat_completion_tool_call( + span_exporter, log_exporter, async_openai_client, expect_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [ + {"role": "system", "content": "You're a helpful assistant."}, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?", + }, + ] + + response_0 = await async_openai_client.chat.completions.create( + messages=messages_value, + model=llm_model_value, + tool_choice="auto", + tools=[get_current_weather_tool_definition()], + ) + + # sanity check + assert "tool_calls" in response_0.choices[0].finish_reason + + # final request + messages_value.append( + { + "role": "assistant", + "tool_calls": response_0.choices[0].message.to_dict()[ + "tool_calls" + ], + } + ) + + tool_call_result_0 = { + "role": "tool", + "content": "50 degrees and raining", + "tool_call_id": response_0.choices[0].message.tool_calls[0].id, + } + tool_call_result_1 = { + "role": "tool", + "content": "70 degrees and sunny", + "tool_call_id": response_0.choices[0].message.tool_calls[1].id, + } + + messages_value.append(tool_call_result_0) + messages_value.append(tool_call_result_1) + + response_1 = await async_openai_client.chat.completions.create( + messages=messages_value, model=llm_model_value + ) + + # sanity check + assert "stop" in response_1.choices[0].finish_reason + + # validate both calls + spans = span_exporter.get_finished_spans() + assert len(spans) == 2 + assert_completion_attributes(spans[0], llm_model_value, response_0) + assert_completion_attributes(spans[1], llm_model_value, response_1) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 9 # 3 logs for first completion, 6 for second + + # call one + system_message = ( + {"content": messages_value[0]["content"]} if expect_content else None + ) + assert_message_in_logs( + logs[0], "gen_ai.system.message", system_message, spans[0] + ) + + user_message = ( + {"content": messages_value[1]["content"]} if expect_content else None + ) + assert_message_in_logs( + logs[1], "gen_ai.user.message", user_message, spans[0] + ) + + function_call_0 = {"name": "get_current_weather"} + function_call_1 = {"name": "get_current_weather"} + if expect_content: + function_call_0["arguments"] = ( + response_0.choices[0] + .message.tool_calls[0] + .function.arguments.replace("\n", "") + ) + function_call_1["arguments"] = ( + response_0.choices[0] + .message.tool_calls[1] + .function.arguments.replace("\n", "") + ) + + choice_event = { + "index": 0, + "finish_reason": "tool_calls", + "message": { + "role": "assistant", + "tool_calls": [ + { + "id": response_0.choices[0].message.tool_calls[0].id, + "type": "function", + "function": function_call_0, + }, + { + "id": response_0.choices[0].message.tool_calls[1].id, + "type": "function", + "function": function_call_1, + }, + ], + }, + } + assert_message_in_logs(logs[2], "gen_ai.choice", choice_event, spans[0]) + + # call two + system_message = ( + {"content": messages_value[0]["content"]} if expect_content else None + ) + assert_message_in_logs( + logs[3], "gen_ai.system.message", system_message, spans[1] + ) + + user_message = ( + {"content": messages_value[1]["content"]} if expect_content else None + ) + assert_message_in_logs( + logs[4], "gen_ai.user.message", user_message, spans[1] + ) + + assistant_tool_call = {"tool_calls": messages_value[2]["tool_calls"]} + if not expect_content: + assistant_tool_call["tool_calls"][0]["function"]["arguments"] = None + assistant_tool_call["tool_calls"][1]["function"]["arguments"] = None + + assert_message_in_logs( + logs[5], "gen_ai.assistant.message", assistant_tool_call, spans[1] + ) + + tool_message_0 = { + "id": tool_call_result_0["tool_call_id"], + "content": tool_call_result_0["content"] if expect_content else None, + } + + assert_message_in_logs( + logs[6], "gen_ai.tool.message", tool_message_0, spans[1] + ) + + tool_message_1 = { + "id": tool_call_result_1["tool_call_id"], + "content": tool_call_result_1["content"] if expect_content else None, + } + + assert_message_in_logs( + logs[7], "gen_ai.tool.message", tool_message_1, spans[1] + ) + + message = { + "role": "assistant", + "content": response_1.choices[0].message.content + if expect_content + else None, + } + choice = { + "index": 0, + "finish_reason": "stop", + "message": message, + } + assert_message_in_logs(logs[8], "gen_ai.choice", choice, spans[1]) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_streaming( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + llm_model_value = "gpt-4" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + kwargs = { + "model": llm_model_value, + "messages": messages_value, + "stream": True, + "stream_options": {"include_usage": True}, + } + + response_stream_usage = None + response_stream_model = None + response_stream_id = None + response_stream_result = "" + response = await async_openai_client.chat.completions.create(**kwargs) + async for chunk in response: + if chunk.choices: + response_stream_result += chunk.choices[0].delta.content or "" + + # get the last chunk + if getattr(chunk, "usage", None): + response_stream_usage = chunk.usage + response_stream_model = chunk.model + response_stream_id = chunk.id + + spans = span_exporter.get_finished_spans() + assert_all_attributes( + spans[0], + llm_model_value, + response_stream_id, + response_stream_model, + response_stream_usage.prompt_tokens, + response_stream_usage.completion_tokens, + ) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 2 + + user_message = {"content": "Say this is a test"} + assert_message_in_logs( + logs[0], "gen_ai.user.message", user_message, spans[0] + ) + + choice_event = { + "index": 0, + "finish_reason": "stop", + "message": {"role": "assistant", "content": response_stream_result}, + } + assert_message_in_logs(logs[1], "gen_ai.choice", choice_event, spans[0]) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_streaming_not_complete( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + llm_model_value = "gpt-4" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + kwargs = { + "model": llm_model_value, + "messages": messages_value, + "stream": True, + } + + response_stream_model = None + response_stream_id = None + response_stream_result = "" + response = await async_openai_client.chat.completions.create(**kwargs) + idx = 0 + async for chunk in response: + if chunk.choices: + response_stream_result += chunk.choices[0].delta.content or "" + if idx == 1: + # fake a stop + break + + if chunk.model: + response_stream_model = chunk.model + if chunk.id: + response_stream_id = chunk.id + idx += 1 + + response.close() + spans = span_exporter.get_finished_spans() + assert_all_attributes( + spans[0], llm_model_value, response_stream_id, response_stream_model + ) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 2 + + user_message = {"content": "Say this is a test"} + assert_message_in_logs( + logs[0], "gen_ai.user.message", user_message, spans[0] + ) + + choice_event = { + "index": 0, + "finish_reason": "error", + "message": {"role": "assistant", "content": response_stream_result}, + } + assert_message_in_logs(logs[1], "gen_ai.choice", choice_event, spans[0]) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_multiple_choices_streaming( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [ + {"role": "system", "content": "You're a helpful assistant."}, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?", + }, + ] + + response_0 = await async_openai_client.chat.completions.create( + messages=messages_value, + model=llm_model_value, + n=2, + stream=True, + stream_options={"include_usage": True}, + ) + + # two strings for each choice + response_stream_result = ["", ""] + finish_reasons = ["", ""] + async for chunk in response_0: + if chunk.choices: + for choice in chunk.choices: + response_stream_result[choice.index] += ( + choice.delta.content or "" + ) + if choice.finish_reason: + finish_reasons[choice.index] = choice.finish_reason + + # get the last chunk + if getattr(chunk, "usage", None): + response_stream_usage = chunk.usage + response_stream_model = chunk.model + response_stream_id = chunk.id + + # sanity check + assert "stop" == finish_reasons[0] + + spans = span_exporter.get_finished_spans() + assert_all_attributes( + spans[0], + llm_model_value, + response_stream_id, + response_stream_model, + response_stream_usage.prompt_tokens, + response_stream_usage.completion_tokens, + ) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 4 + + system_message = {"content": messages_value[0]["content"]} + assert_message_in_logs( + logs[0], "gen_ai.system.message", system_message, spans[0] + ) + + user_message = { + "content": "What's the weather in Seattle and San Francisco today?" + } + assert_message_in_logs( + logs[1], "gen_ai.user.message", user_message, spans[0] + ) + + choice_event_0 = { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "".join(response_stream_result[0]), + }, + } + assert_message_in_logs(logs[2], "gen_ai.choice", choice_event_0, spans[0]) + + choice_event_1 = { + "index": 1, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "".join(response_stream_result[1]), + }, + } + assert_message_in_logs(logs[3], "gen_ai.choice", choice_event_1, spans[0]) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_multiple_tools_streaming_with_content( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + await async_chat_completion_multiple_tools_streaming( + span_exporter, log_exporter, async_openai_client, True + ) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_multiple_tools_streaming_no_content( + span_exporter, log_exporter, async_openai_client, instrument_no_content +): + await async_chat_completion_multiple_tools_streaming( + span_exporter, log_exporter, async_openai_client, False + ) + + +async def async_chat_completion_multiple_tools_streaming( + span_exporter, log_exporter, async_openai_client, expect_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [ + {"role": "system", "content": "You're a helpful assistant."}, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?", + }, + ] + + response = await async_openai_client.chat.completions.create( + messages=messages_value, + model=llm_model_value, + tool_choice="auto", + tools=[get_current_weather_tool_definition()], + stream=True, + stream_options={"include_usage": True}, + ) + + finish_reason = None + # two tools + tool_names = ["", ""] + tool_call_ids = ["", ""] + tool_args = ["", ""] + async for chunk in response: + if chunk.choices: + if chunk.choices[0].finish_reason: + finish_reason = chunk.choices[0].finish_reason + for tool_call in chunk.choices[0].delta.tool_calls or []: + t_idx = tool_call.index + if tool_call.id: + tool_call_ids[t_idx] = tool_call.id + if tool_call.function: + if tool_call.function.arguments: + tool_args[t_idx] += tool_call.function.arguments + if tool_call.function.name: + tool_names[t_idx] = tool_call.function.name + + # get the last chunk + if getattr(chunk, "usage", None): + response_stream_usage = chunk.usage + response_stream_model = chunk.model + response_stream_id = chunk.id + + # sanity check + assert "tool_calls" == finish_reason + + spans = span_exporter.get_finished_spans() + assert_all_attributes( + spans[0], + llm_model_value, + response_stream_id, + response_stream_model, + response_stream_usage.prompt_tokens, + response_stream_usage.completion_tokens, + ) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 3 + + system_message = ( + {"content": messages_value[0]["content"]} if expect_content else None + ) + assert_message_in_logs( + logs[0], "gen_ai.system.message", system_message, spans[0] + ) + + user_message = ( + {"content": "What's the weather in Seattle and San Francisco today?"} + if expect_content + else None + ) + assert_message_in_logs( + logs[1], "gen_ai.user.message", user_message, spans[0] + ) + + choice_event = { + "index": 0, + "finish_reason": "tool_calls", + "message": { + "role": "assistant", + "tool_calls": [ + { + "id": tool_call_ids[0], + "type": "function", + "function": { + "name": tool_names[0], + "arguments": ( + tool_args[0].replace("\n", "") + if expect_content + else None + ), + }, + }, + { + "id": tool_call_ids[1], + "type": "function", + "function": { + "name": tool_names[1], + "arguments": ( + tool_args[1].replace("\n", "") + if expect_content + else None + ), + }, + }, + ], + }, + } + assert_message_in_logs(logs[2], "gen_ai.choice", choice_event, spans[0]) + + +def assert_message_in_logs(log, event_name, expected_content, parent_span): + assert log.log_record.attributes[EventAttributes.EVENT_NAME] == event_name + assert ( + log.log_record.attributes[GenAIAttributes.GEN_AI_SYSTEM] + == GenAIAttributes.GenAiSystemValues.OPENAI.value + ) + + if not expected_content: + assert not log.log_record.body + else: + assert log.log_record.body + assert dict(log.log_record.body) == remove_none_values( + expected_content + ) + assert_log_parent(log, parent_span) + + +def remove_none_values(body): + result = {} + for key, value in body.items(): + if value is None: + continue + if isinstance(value, dict): + result[key] = remove_none_values(value) + elif isinstance(value, list): + result[key] = [remove_none_values(i) for i in value] + else: + result[key] = value + return result + + +def assert_completion_attributes( + span: ReadableSpan, + request_model: str, + response: ChatCompletion, + operation_name: str = "chat", + server_address: str = "api.openai.com", +): + return assert_all_attributes( + span, + request_model, + response.id, + response.model, + response.usage.prompt_tokens, + response.usage.completion_tokens, + operation_name, + server_address, + ) + + +def assert_all_attributes( + span: ReadableSpan, + request_model: str, + response_id: str = None, + response_model: str = None, + input_tokens: Optional[int] = None, + output_tokens: Optional[int] = None, + operation_name: str = "chat", + server_address: str = "api.openai.com", +): + assert span.name == f"{operation_name} {request_model}" + assert ( + operation_name + == span.attributes[GenAIAttributes.GEN_AI_OPERATION_NAME] + ) + assert ( + GenAIAttributes.GenAiSystemValues.OPENAI.value + == span.attributes[GenAIAttributes.GEN_AI_SYSTEM] + ) + assert ( + request_model == span.attributes[GenAIAttributes.GEN_AI_REQUEST_MODEL] + ) + if response_model: + assert ( + response_model + == span.attributes[GenAIAttributes.GEN_AI_RESPONSE_MODEL] + ) + else: + assert GenAIAttributes.GEN_AI_RESPONSE_MODEL not in span.attributes + + if response_id: + assert ( + response_id == span.attributes[GenAIAttributes.GEN_AI_RESPONSE_ID] + ) + else: + assert GenAIAttributes.GEN_AI_RESPONSE_ID not in span.attributes + + if input_tokens: + assert ( + input_tokens + == span.attributes[GenAIAttributes.GEN_AI_USAGE_INPUT_TOKENS] + ) + else: + assert GenAIAttributes.GEN_AI_USAGE_INPUT_TOKENS not in span.attributes + + if output_tokens: + assert ( + output_tokens + == span.attributes[GenAIAttributes.GEN_AI_USAGE_OUTPUT_TOKENS] + ) + else: + assert ( + GenAIAttributes.GEN_AI_USAGE_OUTPUT_TOKENS not in span.attributes + ) + + assert server_address == span.attributes[ServerAttributes.SERVER_ADDRESS] + + +def assert_log_parent(log, span): + assert log.log_record.trace_id == span.get_span_context().trace_id + assert log.log_record.span_id == span.get_span_context().span_id + assert log.log_record.trace_flags == span.get_span_context().trace_flags + + +def get_current_weather_tool_definition(): + return { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. Boston, MA", + }, + }, + "required": ["location"], + "additionalProperties": False, + }, + }, + } From 0dacda8301a77aa50f77018d2c5e20708176e2ca Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Fri, 8 Nov 2024 16:00:40 +0200 Subject: [PATCH 04/20] fix tests runtime warnings --- ...chat_completion_tool_calls_no_content.yaml | 215 ++++++++++++++++++ ...at_completion_tool_calls_with_content.yaml | 215 ++++++++++++++++++ .../tests/test_async_chat_completions.py | 4 +- 3 files changed, 432 insertions(+), 2 deletions(-) create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml new file mode 100644 index 0000000000..3aa63d6215 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml @@ -0,0 +1,215 @@ +interactions: +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}], "model": "gpt-4o-mini", "tool_choice": "auto", "tools": [{"type": + "function", "function": {"name": "get_current_weather", "description": "Get + the current weather in a given location", "parameters": {"type": "object", "properties": + {"location": {"type": "string", "description": "The city and state, e.g. Boston, + MA"}}, "required": ["location"], "additionalProperties": false}}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '543' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJkWSl3FJCaxY2M5c1mIZXvCkIb0\",\n \"object\": + \"chat.completion\",\n \"created\": 1731074136,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n + \ \"id\": \"call_Hmg9bHwsiXUofekPckiN91TS\",\n \"type\": + \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n + \ \"arguments\": \"{\\\"location\\\": \\\"Seattle, WA\\\"}\"\n + \ }\n },\n {\n \"id\": \"call_75j1tY784nud9uU0kR9r0lfN\",\n + \ \"type\": \"function\",\n \"function\": {\n \"name\": + \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\": + \\\"San Francisco, CA\\\"}\"\n }\n }\n ],\n \"refusal\": + null\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n + \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 75,\n \"completion_tokens\": + 51,\n \"total_tokens\": 126,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": + \"fp_0ba0d124f1\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df60fc96b19e27a-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:55:37 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '1308' + openai-organization: test_organization + openai-processing-ms: + - '1022' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999960' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_34ca1c97461dd1272256b64988bd56ff + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}, {"role": "assistant", "tool_calls": [{"id": "call_Hmg9bHwsiXUofekPckiN91TS", + "function": {"arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather"}, + "type": "function"}, {"id": "call_75j1tY784nud9uU0kR9r0lfN", "function": {"arguments": + "{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather"}, "type": + "function"}]}, {"role": "tool", "content": "50 degrees and raining", "tool_call_id": + "call_Hmg9bHwsiXUofekPckiN91TS"}, {"role": "tool", "content": "70 degrees and + sunny", "tool_call_id": "call_75j1tY784nud9uU0kR9r0lfN"}], "model": "gpt-4o-mini"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '746' + content-type: + - application/json + cookie: + - __cf_bm=9IFaLwbVtK7uOEFE2dslUkFDFTCFSZEUsU3yr6pZ_3I-1731074137-1.0.1.1-3uYq4aPispFdfxboed6vtN_eKem1xnkFZrlgg2PtlQbpidFIlCI11ZDKeF5k0OAI3Nh0sv_WoFbVqx22I2JsEQ; + _cfuvid=5bL_g45Wr1SP1uqQC1y2L.xbhNhBsaU4gvhrperwPYY-1731074137720-0.0.1.1-604800000 + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJkXLOI2fMtY8OJk08OqQ957oW12\",\n \"object\": + \"chat.completion\",\n \"created\": 1731074137,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Today, the weather in Seattle is 50 + degrees and raining, while in San Francisco, it's 70 degrees and sunny.\",\n + \ \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\": + \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 99,\n \"completion_tokens\": + 25,\n \"total_tokens\": 124,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": + \"fp_0ba0d124f1\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df60fd12862e27a-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:55:38 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '859' + openai-organization: test_organization + openai-processing-ms: + - '625' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999948' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_7f3194ba56f6e84bfbec244bc9e697c7 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml new file mode 100644 index 0000000000..6400ac8fd1 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml @@ -0,0 +1,215 @@ +interactions: +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}], "model": "gpt-4o-mini", "tool_choice": "auto", "tools": [{"type": + "function", "function": {"name": "get_current_weather", "description": "Get + the current weather in a given location", "parameters": {"type": "object", "properties": + {"location": {"type": "string", "description": "The city and state, e.g. Boston, + MA"}}, "required": ["location"], "additionalProperties": false}}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '543' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJkUajohZiNR9Hzjp4jHsZeyLTXn\",\n \"object\": + \"chat.completion\",\n \"created\": 1731074134,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n + \ \"id\": \"call_gdXlzxsJq8bgV6vDy52d8r0N\",\n \"type\": + \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n + \ \"arguments\": \"{\\\"location\\\": \\\"Seattle, WA\\\"}\"\n + \ }\n },\n {\n \"id\": \"call_EZyypeD7zIcuVG0NisQ36VB7\",\n + \ \"type\": \"function\",\n \"function\": {\n \"name\": + \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\": + \\\"San Francisco, CA\\\"}\"\n }\n }\n ],\n \"refusal\": + null\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n + \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 75,\n \"completion_tokens\": + 51,\n \"total_tokens\": 126,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": + \"fp_0ba0d124f1\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df60fbb4f0241f0-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:55:35 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '1308' + openai-organization: test_organization + openai-processing-ms: + - '1079' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999960' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_9a5a4e89cc266daf5008b64ed5fbaf07 + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}, {"role": "assistant", "tool_calls": [{"id": "call_gdXlzxsJq8bgV6vDy52d8r0N", + "function": {"arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather"}, + "type": "function"}, {"id": "call_EZyypeD7zIcuVG0NisQ36VB7", "function": {"arguments": + "{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather"}, "type": + "function"}]}, {"role": "tool", "content": "50 degrees and raining", "tool_call_id": + "call_gdXlzxsJq8bgV6vDy52d8r0N"}, {"role": "tool", "content": "70 degrees and + sunny", "tool_call_id": "call_EZyypeD7zIcuVG0NisQ36VB7"}], "model": "gpt-4o-mini"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '746' + content-type: + - application/json + cookie: + - __cf_bm=uccQyWNZnSUT3NfE7TrDr_Qb0pJi0nCetLcHgpqvZF4-1731074135-1.0.1.1-4fj4Re6hs6myrY4O5hYugP5kze7SKj3Eko74XDuaa7v5m8Ox3IYtFrIA70lT3UfqeBWlyCtoP9iqxCgnaHDZQg; + _cfuvid=QOd1Lms.2nqAQl0cUyMCL.bGypkci3yI8gFdpnO9qp4-1731074135646-0.0.1.1-604800000 + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJkVEHUtbthDFKhPrCrM08EwO42n\",\n \"object\": + \"chat.completion\",\n \"created\": 1731074135,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Today, the weather in Seattle is 50 + degrees and raining, while in San Francisco, it is 70 degrees and sunny.\",\n + \ \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\": + \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 99,\n \"completion_tokens\": + 26,\n \"total_tokens\": 125,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": + \"fp_0ba0d124f1\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df60fc439ad41f0-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:55:36 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '860' + openai-organization: test_organization + openai-processing-ms: + - '490' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999948' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_efe88734f57b290d25873df3c75aa3d1 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py index 01ad704b45..1c4b3cb7dd 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py @@ -196,7 +196,7 @@ async def test_async_chat_completion_multiple_choices( async def test_async_chat_completion_tool_calls_with_content( span_exporter, log_exporter, async_openai_client, instrument_with_content ): - chat_completion_tool_call( + await chat_completion_tool_call( span_exporter, log_exporter, async_openai_client, True ) @@ -206,7 +206,7 @@ async def test_async_chat_completion_tool_calls_with_content( async def test_async_chat_completion_tool_calls_no_content( span_exporter, log_exporter, async_openai_client, instrument_no_content ): - chat_completion_tool_call( + await chat_completion_tool_call( span_exporter, log_exporter, async_openai_client, False ) From da7c1e53ffca7c811686af8641bbf12f94a92769 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Sat, 9 Nov 2024 14:08:59 +0200 Subject: [PATCH 05/20] add changelog --- .../opentelemetry-instrumentation-openai-v2/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md index 2fdeeea74f..998534cbbf 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Added a wrapper for `AsyncCompletions.create` inside `src/opentelemetry/instrumentation/openai_v2/__init__.py` to instrument async chat completions +- Created a new patch function for async chat completions +- Abstracted handling span exceptions into it's own function as it was getting used in multiple places +- Adjusted `StreamWrapper` to include async methods for supporting async streaming +- Added Tests using `pytest-asyncio` fixtures + ## Version 2.0b0 (2024-11-08) - Use generic `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` environment variable From accf17cf6b57b206dad3e62c6575bdcffa907193 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Mon, 11 Nov 2024 14:02:48 +0200 Subject: [PATCH 06/20] relax changelog & adjust conftest --- .../CHANGELOG.md | 6 +- .../test_async_chat_completion_404.yaml | 30 +- ...st_async_chat_completion_extra_params.yaml | 73 ++- ...sync_chat_completion_multiple_choices.yaml | 83 +++- ...completion_multiple_choices_streaming.yaml | 424 +++++------------- ...n_multiple_tools_streaming_no_content.yaml | 119 ++--- ...multiple_tools_streaming_with_content.yaml | 119 ++--- .../test_async_chat_completion_streaming.yaml | 54 +-- ...hat_completion_streaming_not_complete.yaml | 48 +- ...chat_completion_tool_calls_no_content.yaml | 238 +++++++--- ...at_completion_tool_calls_with_content.yaml | 238 +++++++--- ...st_async_chat_completion_with_content.yaml | 69 ++- .../tests/conftest.py | 2 +- 13 files changed, 851 insertions(+), 652 deletions(-) diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md index 998534cbbf..7dd3b58558 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md @@ -7,11 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -- Added a wrapper for `AsyncCompletions.create` inside `src/opentelemetry/instrumentation/openai_v2/__init__.py` to instrument async chat completions -- Created a new patch function for async chat completions -- Abstracted handling span exceptions into it's own function as it was getting used in multiple places -- Adjusted `StreamWrapper` to include async methods for supporting async streaming -- Added Tests using `pytest-asyncio` fixtures +- Support for `AsyncOpenAI/AsyncCompletions` ## Version 2.0b0 (2024-11-08) diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml index d21ef48ac7..3eb8efc2ce 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml @@ -1,7 +1,15 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "this-model-does-not-exist"}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "this-model-does-not-exist" + } headers: accept: - application/json @@ -35,20 +43,26 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"error\": {\n \"message\": \"The model `this-model-does-not-exist` - does not exist or you do not have access to it.\",\n \"type\": \"invalid_request_error\",\n - \ \"param\": null,\n \"code\": \"model_not_found\"\n }\n}\n" + string: |- + { + "error": { + "message": "The model `this-model-does-not-exist` does not exist or you do not have access to it.", + "type": "invalid_request_error", + "param": null, + "code": "model_not_found" + } + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5e31d6e45e284-MRS + - 8e0e20160ec6e17f-MRS Connection: - keep-alive Content-Type: - application/json; charset=utf-8 Date: - - Fri, 08 Nov 2024 13:25:06 GMT + - Mon, 11 Nov 2024 12:01:02 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -66,7 +80,7 @@ interactions: vary: - Origin x-request-id: - - req_82c60ab486740fa07db9b846df2d532b + - req_93d359c0eeba1f2be7308d9132e82bf5 status: code: 404 message: Not Found diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml index 18dd64f971..75989a29bc 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml @@ -1,8 +1,20 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "gpt-4o-mini", "max_tokens": 50, "seed": 42, "stream": false, "temperature": - 0.5, "service_tier": "default"}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "gpt-4o-mini", + "max_tokens": 50, + "seed": 42, + "stream": false, + "temperature": 0.5, + "service_tier": "default" + } headers: accept: - application/json @@ -36,28 +48,53 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJJHh1NYn4MAJ5vmO2u6MC0QWvS3\",\n \"object\": - \"chat.completion\",\n \"created\": 1731072447,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"This is a test. How can I assist you - further?\",\n \"refusal\": null\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 12,\n \"completion_tokens\": 12,\n \"total_tokens\": 24,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_0ba0d124f1\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNOJZk6WBJTYWmACy5zBiYnkvXAw", + "object": "chat.completion", + "created": 1731326463, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "This is a test. How can I assist you further?", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12, + "completion_tokens": 12, + "total_tokens": 24, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5e68e7df7e20d-MRS + - 8e0e20191e7670e7-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:27:28 GMT + - Mon, 11 Nov 2024 12:01:03 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -73,7 +110,7 @@ interactions: - '825' openai-organization: test_organization openai-processing-ms: - - '373' + - '483' openai-version: - '2020-10-01' strict-transport-security: @@ -91,7 +128,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_bea7292421fe218c0a9e158dbb7699d7 + - req_bbcd55fb3044f058ea9f9ae8a388698d status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml index 803216aa1b..e38e5c13f0 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml @@ -1,7 +1,17 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "gpt-4o-mini", "n": 2, "stream": false}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "gpt-4o-mini", + "n": 2, + "stream": false + } headers: accept: - application/json @@ -35,31 +45,62 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJJITAE6LSpkhJ4F6Lkgx1hjMWce\",\n \"object\": - \"chat.completion\",\n \"created\": 1731072448,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"This is a test.\",\n \"refusal\": - null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n - \ },\n {\n \"index\": 1,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"This is a test. How can I assist you - further?\",\n \"refusal\": null\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 12,\n \"completion_tokens\": 17,\n \"total_tokens\": 29,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_9b78b61c52\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNOJmzXWHqTArL7xMAtIJhIuu46p", + "object": "chat.completion", + "created": 1731326463, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "This is a test! How can I assist you further?", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + }, + { + "index": 1, + "message": { + "role": "assistant", + "content": "This is a test. How can I assist you further?", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12, + "completion_tokens": 24, + "total_tokens": 36, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5e692e8c9129a-MRS + - 8e0e201e3de30771-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:27:29 GMT + - Mon, 11 Nov 2024 12:01:04 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -72,10 +113,10 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '1000' + - '1030' openai-organization: test_organization openai-processing-ms: - - '404' + - '373' openai-version: - '2020-10-01' strict-transport-security: @@ -93,7 +134,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_7d77cf85328e6feb1d9c2d52f2a69cfb + - req_d1f29830c9ae2a48e896be67a1edcfd6 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml index 3ebcfc9909..162e6b0a54 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml @@ -1,9 +1,24 @@ interactions: - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}], "model": "gpt-4o-mini", "n": 2, "stream": true, "stream_options": - {"include_usage": true}}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + } + ], + "model": "gpt-4o-mini", + "n": 2, + "stream": true, + "stream_options": { + "include_usage": true + } + } headers: accept: - application/json @@ -37,411 +52,210 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + string: |+ + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"I'm"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"I"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"I'm"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" unable"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" unable"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"I''m"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - don''t"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" provide"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" provide"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - sorry"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" real"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" real"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - have"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - real"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" updates"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" like"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - but"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" However"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - I"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" conditions"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - capabilities"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" you"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - to"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" can"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" To"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - check"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" easily"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" get"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" check"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - don''t"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" most"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - have"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" accurate"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - access"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - to"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" up"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - current"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - real"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" San"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" using"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-to"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-date"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - data"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - However"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" San"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" website"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - including"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - I"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" mobile"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" I"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - current"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" app"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" recommend"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - recommend"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" checking"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" If"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - checking"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" you"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" reliable"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - updates"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" need"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" historical"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" website"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - reliable"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" app"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - I"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" general"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" climate"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - recommend"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" patterns"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - website"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" these"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" cities"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - checking"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" feel"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - or"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" free"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" ask"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - app"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - reliable"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - for"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - website"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - latest"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - or"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - app"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - updates"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - for"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - in"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - latest"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - and"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - forecasts"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - San"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - for"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - and"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - Websites"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - San"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - like"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - Weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":".com"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - National"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - Weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - Service"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - or"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - apps"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - on"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - your"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - smartphone"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - should"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - provide"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - you"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - with"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - accurate"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - and"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - up"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-to"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-date"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - information"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":26,"completion_tokens":98,"total_tokens":124,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} - + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":26,"completion_tokens":90,"total_tokens":116,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5ea1bbe311858-MRS + - 8e0e204eeffee22f-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Fri, 08 Nov 2024 13:29:53 GMT + - Mon, 11 Nov 2024 12:01:11 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -455,7 +269,7 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '141' + - '221' openai-version: - '2020-10-01' strict-transport-security: @@ -473,7 +287,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_7e5fb27046bd51744452679772149d45 + - req_57123afa9a5d1ae1abe38ebd3799be22 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml index b09e1ceb9f..44d4c526fb 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml @@ -1,13 +1,46 @@ interactions: - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}], "model": "gpt-4o-mini", "stream": true, "stream_options": {"include_usage": - true}, "tool_choice": "auto", "tools": [{"type": "function", "function": {"name": - "get_current_weather", "description": "Get the current weather in a given location", - "parameters": {"type": "object", "properties": {"location": {"type": "string", - "description": "The city and state, e.g. Boston, MA"}}, "required": ["location"], - "additionalProperties": false}}}]}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + } + ], + "model": "gpt-4o-mini", + "stream": true, + "stream_options": { + "include_usage": true + }, + "tool_choice": "auto", + "tools": [ + { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. Boston, MA" + } + }, + "required": [ + "location" + ], + "additionalProperties": false + } + } + } + ] + } headers: accept: - application/json @@ -41,80 +74,56 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + string: |+ + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_GuNfPyHYLpR7NxIAFU7YlEdw","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_5Maqr8qm7jHMMZLQEtaeQZ7E","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, W"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": - \"S"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_GIc62d1Svd9d2BW8WEVc3VJy","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, - W"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an F"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, C"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_Tfs3ahuPFNggkm8nBav8YkLm","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": - \"S"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an - F"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, - C"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5ea2f9dd16404-LHR + - 8e0e20624d7fe280-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Fri, 08 Nov 2024 13:29:57 GMT + - Mon, 11 Nov 2024 12:01:15 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -128,7 +137,7 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '897' + - '1064' openai-version: - '2020-10-01' strict-transport-security: @@ -146,7 +155,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_443646b762c7e28f71ae8700526e59a6 + - req_7029e07196e4747502b310aa5b43a3b8 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml index bee1ef60c3..d3ea956936 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml @@ -1,13 +1,46 @@ interactions: - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}], "model": "gpt-4o-mini", "stream": true, "stream_options": {"include_usage": - true}, "tool_choice": "auto", "tools": [{"type": "function", "function": {"name": - "get_current_weather", "description": "Get the current weather in a given location", - "parameters": {"type": "object", "properties": {"location": {"type": "string", - "description": "The city and state, e.g. Boston, MA"}}, "required": ["location"], - "additionalProperties": false}}}]}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + } + ], + "model": "gpt-4o-mini", + "stream": true, + "stream_options": { + "include_usage": true + }, + "tool_choice": "auto", + "tools": [ + { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. Boston, MA" + } + }, + "required": [ + "location" + ], + "additionalProperties": false + } + } + } + ] + } headers: accept: - application/json @@ -41,80 +74,56 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + string: |+ + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_LIALtixlXYDOoaybI8QLNpU4","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_qVaxkDwCBrNXL42bTYTo4OXj","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, W"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": - \"S"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_DpuejD0bu1DeP4VTKxL2HpPC","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, - W"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an F"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, C"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_imlAeCj1ZENGXNHEaK19vqhy","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": - \"S"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an - F"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, - C"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5ea276ada35db-LHR + - 8e0e2058fe8c0d81-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Fri, 08 Nov 2024 13:29:56 GMT + - Mon, 11 Nov 2024 12:01:14 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -128,7 +137,7 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '920' + - '1012' openai-version: - '2020-10-01' strict-transport-security: @@ -146,7 +155,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_85256ce49f10bf2d4c5d78674bfd758c + - req_65a1bd511c6ef6a75a9b7366f1317482 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml index 2abc823bcd..216ab48b55 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml @@ -1,7 +1,19 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "gpt-4", "stream": true, "stream_options": {"include_usage": true}}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "gpt-4", + "stream": true, + "stream_options": { + "include_usage": true + } + } headers: accept: - application/json @@ -35,48 +47,36 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + string: |+ + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - is"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - test"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - - - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":12,"completion_tokens":5,"total_tokens":17,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":12,"completion_tokens":5,"total_tokens":17,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5ea117b83e1c1-MRS + - 8e0e20406aace20d-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Fri, 08 Nov 2024 13:29:51 GMT + - Mon, 11 Nov 2024 12:01:09 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -90,7 +90,7 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '223' + - '245' openai-version: - '2020-10-01' strict-transport-security: @@ -108,7 +108,7 @@ interactions: x-ratelimit-reset-tokens: - 1ms x-request-id: - - req_6a1af35b7398ed9b756594f928112eef + - req_993220d84b3aa412d9df9f93837c50e0 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml index e1f31e1a33..0360d6a33b 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml @@ -1,7 +1,16 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "gpt-4", "stream": true}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "gpt-4", + "stream": true + } headers: accept: - application/json @@ -35,45 +44,34 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + string: |+ + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - is"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - test"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} - + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5ea161a645fac-MRS + - 8e0e2048ef0470f2-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Fri, 08 Nov 2024 13:29:52 GMT + - Mon, 11 Nov 2024 12:01:11 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -87,7 +85,7 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '335' + - '285' openai-version: - '2020-10-01' strict-transport-security: @@ -105,7 +103,7 @@ interactions: x-ratelimit-reset-tokens: - 1ms x-request-id: - - req_8ea7fd338691ba6019e8467ff1abdd27 + - req_ba80443b4e602a536744861d19540ef0 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml index 3aa63d6215..77ffea5754 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml @@ -1,12 +1,42 @@ interactions: - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}], "model": "gpt-4o-mini", "tool_choice": "auto", "tools": [{"type": - "function", "function": {"name": "get_current_weather", "description": "Get - the current weather in a given location", "parameters": {"type": "object", "properties": - {"location": {"type": "string", "description": "The city and state, e.g. Boston, - MA"}}, "required": ["location"], "additionalProperties": false}}}]}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + } + ], + "model": "gpt-4o-mini", + "tool_choice": "auto", + "tools": [ + { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. Boston, MA" + } + }, + "required": [ + "location" + ], + "additionalProperties": false + } + } + } + ] + } headers: accept: - application/json @@ -40,35 +70,70 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJkWSl3FJCaxY2M5c1mIZXvCkIb0\",\n \"object\": - \"chat.completion\",\n \"created\": 1731074136,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n - \ \"id\": \"call_Hmg9bHwsiXUofekPckiN91TS\",\n \"type\": - \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n - \ \"arguments\": \"{\\\"location\\\": \\\"Seattle, WA\\\"}\"\n - \ }\n },\n {\n \"id\": \"call_75j1tY784nud9uU0kR9r0lfN\",\n - \ \"type\": \"function\",\n \"function\": {\n \"name\": - \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\": - \\\"San Francisco, CA\\\"}\"\n }\n }\n ],\n \"refusal\": - null\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 75,\n \"completion_tokens\": - 51,\n \"total_tokens\": 126,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0ba0d124f1\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNONBA9uswbK7owOLA7k5HTTgOse", + "object": "chat.completion", + "created": 1731326467, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_REDH25T3s3BBdVf8V2uV60Id", + "type": "function", + "function": { + "name": "get_current_weather", + "arguments": "{\"location\": \"Seattle, WA\"}" + } + }, + { + "id": "call_15HrYApUn2NsS5kYqA4JPoIu", + "type": "function", + "function": { + "name": "get_current_weather", + "arguments": "{\"location\": \"San Francisco, CA\"}" + } + } + ], + "refusal": null + }, + "logprobs": null, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 75, + "completion_tokens": 51, + "total_tokens": 126, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df60fc96b19e27a-MRS + - 8e0e2032b88ee1c0-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:55:37 GMT + - Mon, 11 Nov 2024 12:01:08 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -84,7 +149,7 @@ interactions: - '1308' openai-organization: test_organization openai-processing-ms: - - '1022' + - '879' openai-version: - '2020-10-01' strict-transport-security: @@ -102,20 +167,56 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_34ca1c97461dd1272256b64988bd56ff + - req_8911f9733855181d5f9f10c22ef3ee0b status: code: 200 message: OK - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}, {"role": "assistant", "tool_calls": [{"id": "call_Hmg9bHwsiXUofekPckiN91TS", - "function": {"arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather"}, - "type": "function"}, {"id": "call_75j1tY784nud9uU0kR9r0lfN", "function": {"arguments": - "{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather"}, "type": - "function"}]}, {"role": "tool", "content": "50 degrees and raining", "tool_call_id": - "call_Hmg9bHwsiXUofekPckiN91TS"}, {"role": "tool", "content": "70 degrees and - sunny", "tool_call_id": "call_75j1tY784nud9uU0kR9r0lfN"}], "model": "gpt-4o-mini"}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + }, + { + "role": "assistant", + "tool_calls": [ + { + "id": "call_REDH25T3s3BBdVf8V2uV60Id", + "function": { + "arguments": "{\"location\": \"Seattle, WA\"}", + "name": "get_current_weather" + }, + "type": "function" + }, + { + "id": "call_15HrYApUn2NsS5kYqA4JPoIu", + "function": { + "arguments": "{\"location\": \"San Francisco, CA\"}", + "name": "get_current_weather" + }, + "type": "function" + } + ] + }, + { + "role": "tool", + "content": "50 degrees and raining", + "tool_call_id": "call_REDH25T3s3BBdVf8V2uV60Id" + }, + { + "role": "tool", + "content": "70 degrees and sunny", + "tool_call_id": "call_15HrYApUn2NsS5kYqA4JPoIu" + } + ], + "model": "gpt-4o-mini" + } headers: accept: - application/json @@ -128,8 +229,8 @@ interactions: content-type: - application/json cookie: - - __cf_bm=9IFaLwbVtK7uOEFE2dslUkFDFTCFSZEUsU3yr6pZ_3I-1731074137-1.0.1.1-3uYq4aPispFdfxboed6vtN_eKem1xnkFZrlgg2PtlQbpidFIlCI11ZDKeF5k0OAI3Nh0sv_WoFbVqx22I2JsEQ; - _cfuvid=5bL_g45Wr1SP1uqQC1y2L.xbhNhBsaU4gvhrperwPYY-1731074137720-0.0.1.1-604800000 + - __cf_bm=1At99fRqY6hc0b7WD0Z6GqxBB8.HnHQdt.zc5aqbBGA-1731326468-1.0.1.1-k4wFZF25WUVRiv8euVZkQW59ZBfatyu853GVjcTFpREVg.Roj3x87yxAamv7PsQBLQGbhaVee09A5A_Ju4crSw; + _cfuvid=cIZnt0ZMVPq97LQaje8nMJbnYSddqmBc2KSSniffSJI-1731326468121-0.0.1.1-604800000 host: - api.openai.com user-agent: @@ -152,29 +253,52 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJkXLOI2fMtY8OJk08OqQ957oW12\",\n \"object\": - \"chat.completion\",\n \"created\": 1731074137,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Today, the weather in Seattle is 50 - degrees and raining, while in San Francisco, it's 70 degrees and sunny.\",\n - \ \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\": - \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 99,\n \"completion_tokens\": - 25,\n \"total_tokens\": 124,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0ba0d124f1\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNOOptAFRkDxUmOcawgASbDQhDxY", + "object": "chat.completion", + "created": 1731326468, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "Today in Seattle, it's 50 degrees and raining. In San Francisco, the weather is much nicer at 70 degrees and sunny.", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 99, + "completion_tokens": 27, + "total_tokens": 126, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df60fd12862e27a-MRS + - 8e0e203a2d46e1c0-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:55:38 GMT + - Mon, 11 Nov 2024 12:01:08 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -187,10 +311,10 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '859' + - '867' openai-organization: test_organization openai-processing-ms: - - '625' + - '542' openai-version: - '2020-10-01' strict-transport-security: @@ -208,7 +332,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_7f3194ba56f6e84bfbec244bc9e697c7 + - req_fd4ceb14593711cab87a48a11f238a08 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml index 6400ac8fd1..c853f22419 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml @@ -1,12 +1,42 @@ interactions: - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}], "model": "gpt-4o-mini", "tool_choice": "auto", "tools": [{"type": - "function", "function": {"name": "get_current_weather", "description": "Get - the current weather in a given location", "parameters": {"type": "object", "properties": - {"location": {"type": "string", "description": "The city and state, e.g. Boston, - MA"}}, "required": ["location"], "additionalProperties": false}}}]}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + } + ], + "model": "gpt-4o-mini", + "tool_choice": "auto", + "tools": [ + { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. Boston, MA" + } + }, + "required": [ + "location" + ], + "additionalProperties": false + } + } + } + ] + } headers: accept: - application/json @@ -40,35 +70,70 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJkUajohZiNR9Hzjp4jHsZeyLTXn\",\n \"object\": - \"chat.completion\",\n \"created\": 1731074134,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n - \ \"id\": \"call_gdXlzxsJq8bgV6vDy52d8r0N\",\n \"type\": - \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n - \ \"arguments\": \"{\\\"location\\\": \\\"Seattle, WA\\\"}\"\n - \ }\n },\n {\n \"id\": \"call_EZyypeD7zIcuVG0NisQ36VB7\",\n - \ \"type\": \"function\",\n \"function\": {\n \"name\": - \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\": - \\\"San Francisco, CA\\\"}\"\n }\n }\n ],\n \"refusal\": - null\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 75,\n \"completion_tokens\": - 51,\n \"total_tokens\": 126,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0ba0d124f1\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNOKkq28LRJpIiRgmQ7UjNYnmddK", + "object": "chat.completion", + "created": 1731326464, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_yZyfurUiss6jyFfB7COuDKTq", + "type": "function", + "function": { + "name": "get_current_weather", + "arguments": "{\"location\": \"Seattle, WA\"}" + } + }, + { + "id": "call_Se9N4J0FifmT3Q3Bm1erfRJv", + "type": "function", + "function": { + "name": "get_current_weather", + "arguments": "{\"location\": \"San Francisco, CA\"}" + } + } + ], + "refusal": null + }, + "logprobs": null, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 75, + "completion_tokens": 51, + "total_tokens": 126, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "system_fingerprint": "fp_f59a81427f" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df60fbb4f0241f0-MRS + - 8e0e20239972e18b-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:55:35 GMT + - Mon, 11 Nov 2024 12:01:05 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -84,7 +149,7 @@ interactions: - '1308' openai-organization: test_organization openai-processing-ms: - - '1079' + - '1002' openai-version: - '2020-10-01' strict-transport-security: @@ -102,20 +167,56 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_9a5a4e89cc266daf5008b64ed5fbaf07 + - req_dcf2d53b7da813c1abd226e84b10cdf0 status: code: 200 message: OK - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}, {"role": "assistant", "tool_calls": [{"id": "call_gdXlzxsJq8bgV6vDy52d8r0N", - "function": {"arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather"}, - "type": "function"}, {"id": "call_EZyypeD7zIcuVG0NisQ36VB7", "function": {"arguments": - "{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather"}, "type": - "function"}]}, {"role": "tool", "content": "50 degrees and raining", "tool_call_id": - "call_gdXlzxsJq8bgV6vDy52d8r0N"}, {"role": "tool", "content": "70 degrees and - sunny", "tool_call_id": "call_EZyypeD7zIcuVG0NisQ36VB7"}], "model": "gpt-4o-mini"}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + }, + { + "role": "assistant", + "tool_calls": [ + { + "id": "call_yZyfurUiss6jyFfB7COuDKTq", + "function": { + "arguments": "{\"location\": \"Seattle, WA\"}", + "name": "get_current_weather" + }, + "type": "function" + }, + { + "id": "call_Se9N4J0FifmT3Q3Bm1erfRJv", + "function": { + "arguments": "{\"location\": \"San Francisco, CA\"}", + "name": "get_current_weather" + }, + "type": "function" + } + ] + }, + { + "role": "tool", + "content": "50 degrees and raining", + "tool_call_id": "call_yZyfurUiss6jyFfB7COuDKTq" + }, + { + "role": "tool", + "content": "70 degrees and sunny", + "tool_call_id": "call_Se9N4J0FifmT3Q3Bm1erfRJv" + } + ], + "model": "gpt-4o-mini" + } headers: accept: - application/json @@ -128,8 +229,8 @@ interactions: content-type: - application/json cookie: - - __cf_bm=uccQyWNZnSUT3NfE7TrDr_Qb0pJi0nCetLcHgpqvZF4-1731074135-1.0.1.1-4fj4Re6hs6myrY4O5hYugP5kze7SKj3Eko74XDuaa7v5m8Ox3IYtFrIA70lT3UfqeBWlyCtoP9iqxCgnaHDZQg; - _cfuvid=QOd1Lms.2nqAQl0cUyMCL.bGypkci3yI8gFdpnO9qp4-1731074135646-0.0.1.1-604800000 + - __cf_bm=lXXFq397kgLFsJWFRBmEEZto.3sHBvDC7w38zW26pxo-1731326465-1.0.1.1-rHEg1ncerPHXIR85T83jxOZ7_Y9vj3lv.VlJtq7Twuf1MyAtmBDSfDGUepIYGo.L0.23uhDVJBw1snK4Ai.usw; + _cfuvid=W5Ypti8iXPUVbb.ejDDCNvc4F1HDyCJzgR.m7qce61c-1731326465830-0.0.1.1-604800000 host: - api.openai.com user-agent: @@ -152,29 +253,52 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJkVEHUtbthDFKhPrCrM08EwO42n\",\n \"object\": - \"chat.completion\",\n \"created\": 1731074135,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Today, the weather in Seattle is 50 - degrees and raining, while in San Francisco, it is 70 degrees and sunny.\",\n - \ \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\": - \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 99,\n \"completion_tokens\": - 26,\n \"total_tokens\": 125,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0ba0d124f1\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNOMjzpI0LzTV6pXrpyLSKsGtOG4", + "object": "chat.completion", + "created": 1731326466, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "Today, the weather in Seattle is 50 degrees and raining, while in San Francisco, it's 70 degrees and sunny.", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 99, + "completion_tokens": 25, + "total_tokens": 124, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "system_fingerprint": "fp_f59a81427f" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df60fc439ad41f0-MRS + - 8e0e202be8e6e18b-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:55:36 GMT + - Mon, 11 Nov 2024 12:01:06 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -187,10 +311,10 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '860' + - '859' openai-organization: test_organization openai-processing-ms: - - '490' + - '620' openai-version: - '2020-10-01' strict-transport-security: @@ -208,7 +332,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_efe88734f57b290d25873df3c75aa3d1 + - req_06b116947a8f3e7fedc0135e5491779f status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml index 86cbfa5dbd..27e84585f7 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml @@ -1,7 +1,16 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "gpt-4o-mini", "stream": false}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "gpt-4o-mini", + "stream": false + } headers: accept: - application/json @@ -35,28 +44,52 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJChxt2fA6Qwd9jsTvVLvEQerDGZ\",\n \"object\": - \"chat.completion\",\n \"created\": 1731072039,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"This is a test.\",\n \"refusal\": - null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 12,\n \"completion_tokens\": - 5,\n \"total_tokens\": 17,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0ba0d124f1\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNOFSRkr4l6mtuu9wj9V77iVuJm5", + "object": "chat.completion", + "created": 1731326459, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "This is a test. How can I assist you further?", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12, + "completion_tokens": 12, + "total_tokens": 24, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5dc968fb4e1ac-MRS + - 8e0e1ffedc8ae28a-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:20:40 GMT + - Mon, 11 Nov 2024 12:00:59 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -69,10 +102,10 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '765' + - '796' openai-organization: test_organization openai-processing-ms: - - '327' + - '344' openai-version: - '2020-10-01' strict-transport-security: @@ -90,7 +123,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_337e4834bfba3e14ca642a4ffd6d83b6 + - req_feaeab304d6203f932a69d236b443f67 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py index 6effd8a8d1..0f01d12d7a 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py @@ -166,7 +166,7 @@ def deserialize(cassette_string): return yaml.load(cassette_string, Loader=yaml.Loader) -@pytest.fixture(scope="module") +@pytest.fixture(scope="module", autouse=True) def fixture_vcr(vcr): vcr.register_serializer("yaml", PrettyPrintJSONBody) return vcr From 97f8e871796aa2a47f8f0882718afd40b8b857a4 Mon Sep 17 00:00:00 2001 From: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com> Date: Tue, 12 Nov 2024 00:12:26 +0800 Subject: [PATCH 07/20] opentelemetry-instrumentation-openai-v2: add codefromthecrypt and fix yaml fixture (#2989) --- .github/component_owners.yml | 1 + .../tests/cassettes/test_chat_completion_404.yaml | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index 79acc074a7..5cbb6aa402 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -74,3 +74,4 @@ components: - gyliu513 - nirga - alizenhom + - codefromthecrypt diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml index ae00c6ef70..0782cba71d 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_404.yaml @@ -24,7 +24,7 @@ interactions: host: - api.openai.com user-agent: - - OpenAI/Python 1.26.0 + - OpenAI/Python 1.54.3 x-stainless-arch: - arm64 x-stainless-async: @@ -34,7 +34,9 @@ interactions: x-stainless-os: - MacOS x-stainless-package-version: - - 1.26.0 + - 1.54.3 + x-stainless-retry-count: + - '0' x-stainless-runtime: - CPython x-stainless-runtime-version: @@ -56,13 +58,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8dd0709dffd19c8c-SIN + - 8e0ca7056be15f93-SIN Connection: - keep-alive Content-Type: - application/json; charset=utf-8 Date: - - Mon, 04 Nov 2024 00:20:44 GMT + - Mon, 11 Nov 2024 07:43:38 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -80,7 +82,7 @@ interactions: vary: - Origin x-request-id: - - req_e08854c4f7d5104af6fdc755caed30fc + - req_75175efff56c313161c136c479e082ac status: code: 404 message: Not Found From 07691c3a0264e373cecd9b859a5acaf73cc9bf08 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Fri, 8 Nov 2024 14:30:33 +0200 Subject: [PATCH 08/20] add myself to component owners --- .github/component_owners.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index 5cbb6aa402..86d72f019c 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -75,3 +75,4 @@ components: - nirga - alizenhom - codefromthecrypt + - alizenhom From ae905bd29fb5c27631d906894751cf3a543c7412 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Mon, 11 Nov 2024 18:23:48 +0200 Subject: [PATCH 09/20] component-owners --- .github/component_owners.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index 86d72f019c..5cbb6aa402 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -75,4 +75,3 @@ components: - nirga - alizenhom - codefromthecrypt - - alizenhom From 5e743b3b49d5a31bfdea507bcdff7155a55dc065 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Fri, 8 Nov 2024 14:30:33 +0200 Subject: [PATCH 10/20] add myself to component owners --- .github/component_owners.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index 1e89d59567..cc08ec09cf 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -74,3 +74,4 @@ components: - gyliu513 - nirga - codefromthecrypt + - alizenhom From b1b5a4a3cc0030988c128f01b488c14cc80d6908 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Fri, 8 Nov 2024 14:57:53 +0200 Subject: [PATCH 11/20] add async support --- .../instrumentation/openai_v2/__init__.py | 11 ++- .../instrumentation/openai_v2/patch.py | 86 +++++++++++++++---- .../instrumentation/openai_v2/utils.py | 21 ++++- 3 files changed, 99 insertions(+), 19 deletions(-) diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py index e8a782e404..ee3bbfdb73 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py @@ -52,7 +52,7 @@ from opentelemetry.semconv.schemas import Schemas from opentelemetry.trace import get_tracer -from .patch import chat_completions_create +from .patch import async_chat_completions_create, chat_completions_create class OpenAIInstrumentor(BaseInstrumentor): @@ -84,7 +84,16 @@ def _instrument(self, **kwargs): ), ) + wrap_function_wrapper( + module="openai.resources.chat.completions", + name="AsyncCompletions.create", + wrapper=async_chat_completions_create( + tracer, event_logger, is_content_enabled() + ), + ) + def _uninstrument(self, **kwargs): import openai # pylint: disable=import-outside-toplevel unwrap(openai.resources.chat.completions.Completions, "create") + unwrap(openai.resources.chat.completions.AsyncCompletions, "create") diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py index 8540bff219..cd284473ce 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py @@ -21,15 +21,12 @@ from opentelemetry.semconv._incubating.attributes import ( gen_ai_attributes as GenAIAttributes, ) -from opentelemetry.semconv.attributes import ( - error_attributes as ErrorAttributes, -) from opentelemetry.trace import Span, SpanKind, Tracer -from opentelemetry.trace.status import Status, StatusCode from .utils import ( choice_to_event, get_llm_request_attributes, + handle_span_exception, is_streaming, message_to_event, set_span_attribute, @@ -72,12 +69,49 @@ def traced_method(wrapped, instance, args, kwargs): return result except Exception as error: - span.set_status(Status(StatusCode.ERROR, str(error))) + handle_span_exception(span, error) + raise + + return traced_method + + +def async_chat_completions_create( + tracer: Tracer, event_logger: EventLogger, capture_content: bool +): + """Wrap the `create` method of the `AsyncChatCompletion` class to trace it.""" + + async def traced_method(wrapped, instance, args, kwargs): + span_attributes = {**get_llm_request_attributes(kwargs, instance)} + + span_name = f"{span_attributes[GenAIAttributes.GEN_AI_OPERATION_NAME]} {span_attributes[GenAIAttributes.GEN_AI_REQUEST_MODEL]}" + with tracer.start_as_current_span( + name=span_name, + kind=SpanKind.CLIENT, + attributes=span_attributes, + end_on_exit=False, + ) as span: + if span.is_recording(): + for message in kwargs.get("messages", []): + event_logger.emit( + message_to_event(message, capture_content) + ) + + try: + result = await wrapped(*args, **kwargs) + if is_streaming(kwargs): + return StreamWrapper( + result, span, event_logger, capture_content + ) + if span.is_recording(): - span.set_attribute( - ErrorAttributes.ERROR_TYPE, type(error).__qualname__ + _set_response_attributes( + span, result, event_logger, capture_content ) span.end() + return result + + except Exception as error: + handle_span_exception(span, error) raise return traced_method @@ -286,10 +320,19 @@ def __enter__(self): def __exit__(self, exc_type, exc_val, exc_tb): try: if exc_type is not None: - self.span.set_status(Status(StatusCode.ERROR, str(exc_val))) - self.span.set_attribute( - ErrorAttributes.ERROR_TYPE, exc_type.__qualname__ - ) + handle_span_exception(self.span, exc_val) + finally: + self.cleanup() + return False # Propagate the exception + + async def __aenter__(self): + self.setup() + return self + + async def __aexit__(self, exc_type, exc_val, exc_tb): + try: + if exc_type is not None: + handle_span_exception(self.span, exc_val) finally: self.cleanup() return False # Propagate the exception @@ -301,6 +344,9 @@ def close(self): def __iter__(self): return self + def __aiter__(self): + return self + def __next__(self): try: chunk = next(self.stream) @@ -310,10 +356,20 @@ def __next__(self): self.cleanup() raise except Exception as error: - self.span.set_status(Status(StatusCode.ERROR, str(error))) - self.span.set_attribute( - ErrorAttributes.ERROR_TYPE, type(error).__qualname__ - ) + handle_span_exception(self.span, error) + self.cleanup() + raise + + async def __anext__(self): + try: + chunk = await self.stream.__anext__() + self.process_chunk(chunk) + return chunk + except StopAsyncIteration: + self.cleanup() + raise + except Exception as error: + handle_span_exception(self.span, error) self.cleanup() raise diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py index a3a2d317ce..cf920c17ee 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py @@ -26,6 +26,10 @@ from opentelemetry.semconv._incubating.attributes import ( server_attributes as ServerAttributes, ) +from opentelemetry.semconv.attributes import ( + error_attributes as ErrorAttributes, +) +from opentelemetry.trace.status import Status, StatusCode OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT = ( "OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT" @@ -138,9 +142,11 @@ def choice_to_event(choice, capture_content): if choice.message: message = { - "role": choice.message.role - if choice.message and choice.message.role - else None + "role": ( + choice.message.role + if choice.message and choice.message.role + else None + ) } tool_calls = extract_tool_calls(choice.message, capture_content) if tool_calls: @@ -210,3 +216,12 @@ def get_llm_request_attributes( # filter out None values return {k: v for k, v in attributes.items() if v is not None} + + +def handle_span_exception(span, error): + span.set_status(Status(StatusCode.ERROR, str(error))) + if span.is_recording(): + span.set_attribute( + ErrorAttributes.ERROR_TYPE, type(error).__qualname__ + ) + span.end() From d2462bf84096c4c14bc09f256bff497089c7c633 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Fri, 8 Nov 2024 15:39:25 +0200 Subject: [PATCH 12/20] add async tests --- .../test-requirements-0.txt | 1 + .../test-requirements-1.txt | 1 + .../test_async_chat_completion_404.yaml | 73 ++ ...st_async_chat_completion_extra_params.yaml | 98 ++ ...sync_chat_completion_multiple_choices.yaml | 100 +++ ...completion_multiple_choices_streaming.yaml | 480 ++++++++++ ...n_multiple_tools_streaming_no_content.yaml | 153 ++++ ...multiple_tools_streaming_with_content.yaml | 153 ++++ .../test_async_chat_completion_streaming.yaml | 115 +++ ...hat_completion_streaming_not_complete.yaml | 112 +++ ...st_async_chat_completion_with_content.yaml | 97 ++ .../tests/conftest.py | 7 +- .../tests/test_async_chat_completions.py | 847 ++++++++++++++++++ 13 files changed, 2236 insertions(+), 1 deletion(-) create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-0.txt b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-0.txt index 7a15734872..5e1693b69a 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-0.txt +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-0.txt @@ -5,6 +5,7 @@ importlib-metadata==6.11.0 packaging==24.0 pytest==7.4.4 pytest-vcr==1.0.2 +pytest-asyncio==0.21.0 wrapt==1.16.0 opentelemetry-api==1.28 # when updating, also update in pyproject.toml opentelemetry-sdk==1.28 # when updating, also update in pyproject.toml diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-1.txt b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-1.txt index ded849c8ee..618410edd3 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-1.txt +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/test-requirements-1.txt @@ -5,6 +5,7 @@ importlib-metadata==6.11.0 packaging==24.0 pytest==7.4.4 pytest-vcr==1.0.2 +pytest-asyncio==0.21.0 wrapt==1.16.0 # test with the latest version of opentelemetry-api, sdk, and semantic conventions diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml new file mode 100644 index 0000000000..d21ef48ac7 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml @@ -0,0 +1,73 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": + "this-model-does-not-exist"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '103' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"error\": {\n \"message\": \"The model `this-model-does-not-exist` + does not exist or you do not have access to it.\",\n \"type\": \"invalid_request_error\",\n + \ \"param\": null,\n \"code\": \"model_not_found\"\n }\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5e31d6e45e284-MRS + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 08 Nov 2024 13:25:06 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '231' + openai-organization: test_organization + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + vary: + - Origin + x-request-id: + - req_82c60ab486740fa07db9b846df2d532b + status: + code: 404 + message: Not Found +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml new file mode 100644 index 0000000000..18dd64f971 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml @@ -0,0 +1,98 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": + "gpt-4o-mini", "max_tokens": 50, "seed": 42, "stream": false, "temperature": + 0.5, "service_tier": "default"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '183' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJJHh1NYn4MAJ5vmO2u6MC0QWvS3\",\n \"object\": + \"chat.completion\",\n \"created\": 1731072447,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"This is a test. How can I assist you + further?\",\n \"refusal\": null\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 12,\n \"completion_tokens\": 12,\n \"total_tokens\": 24,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_0ba0d124f1\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5e68e7df7e20d-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:27:28 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '825' + openai-organization: test_organization + openai-processing-ms: + - '373' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999943' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_bea7292421fe218c0a9e158dbb7699d7 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml new file mode 100644 index 0000000000..803216aa1b --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml @@ -0,0 +1,100 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": + "gpt-4o-mini", "n": 2, "stream": false}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '114' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJJITAE6LSpkhJ4F6Lkgx1hjMWce\",\n \"object\": + \"chat.completion\",\n \"created\": 1731072448,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"This is a test.\",\n \"refusal\": + null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n + \ },\n {\n \"index\": 1,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"This is a test. How can I assist you + further?\",\n \"refusal\": null\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 12,\n \"completion_tokens\": 17,\n \"total_tokens\": 29,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": + \"fp_9b78b61c52\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5e692e8c9129a-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:27:29 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '1000' + openai-organization: test_organization + openai-processing-ms: + - '404' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999962' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_7d77cf85328e6feb1d9c2d52f2a69cfb + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml new file mode 100644 index 0000000000..3ebcfc9909 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml @@ -0,0 +1,480 @@ +interactions: +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}], "model": "gpt-4o-mini", "n": 2, "stream": true, "stream_options": + {"include_usage": true}}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '254' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"I"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"I''m"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + don''t"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + sorry"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + have"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + real"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + but"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + I"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + capabilities"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + to"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + check"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + don''t"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + have"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + access"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + to"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + current"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + real"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + data"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + However"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + including"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + I"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + current"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + recommend"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + checking"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + updates"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + reliable"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + I"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + recommend"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + website"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + checking"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + or"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + app"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + reliable"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + for"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + website"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + latest"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + or"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + app"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + updates"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + for"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + in"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + latest"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + and"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + forecasts"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + San"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + for"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + and"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + Websites"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + San"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" + Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + like"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + Weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":".com"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + National"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + Weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + Service"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + or"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + apps"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + on"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + your"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + smartphone"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + should"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + provide"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + you"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + with"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + accurate"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + and"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + up"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-to"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-date"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" + information"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + + + data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":26,"completion_tokens":98,"total_tokens":124,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5ea1bbe311858-MRS + Connection: + - keep-alive + Content-Type: + - text/event-stream; charset=utf-8 + Date: + - Fri, 08 Nov 2024 13:29:53 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + openai-organization: test_organization + openai-processing-ms: + - '141' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999945' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_7e5fb27046bd51744452679772149d45 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml new file mode 100644 index 0000000000..b09e1ceb9f --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml @@ -0,0 +1,153 @@ +interactions: +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}], "model": "gpt-4o-mini", "stream": true, "stream_options": {"include_usage": + true}, "tool_choice": "auto", "tools": [{"type": "function", "function": {"name": + "get_current_weather", "description": "Get the current weather in a given location", + "parameters": {"type": "object", "properties": {"location": {"type": "string", + "description": "The city and state, e.g. Boston, MA"}}, "required": ["location"], + "additionalProperties": false}}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '602' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_5Maqr8qm7jHMMZLQEtaeQZ7E","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": + \"S"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, + W"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_Tfs3ahuPFNggkm8nBav8YkLm","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": + \"S"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an + F"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, + C"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} + + + data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5ea2f9dd16404-LHR + Connection: + - keep-alive + Content-Type: + - text/event-stream; charset=utf-8 + Date: + - Fri, 08 Nov 2024 13:29:57 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + openai-organization: test_organization + openai-processing-ms: + - '897' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999960' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_443646b762c7e28f71ae8700526e59a6 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml new file mode 100644 index 0000000000..bee1ef60c3 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml @@ -0,0 +1,153 @@ +interactions: +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}], "model": "gpt-4o-mini", "stream": true, "stream_options": {"include_usage": + true}, "tool_choice": "auto", "tools": [{"type": "function", "function": {"name": + "get_current_weather", "description": "Get the current weather in a given location", + "parameters": {"type": "object", "properties": {"location": {"type": "string", + "description": "The city and state, e.g. Boston, MA"}}, "required": ["location"], + "additionalProperties": false}}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '602' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_qVaxkDwCBrNXL42bTYTo4OXj","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": + \"S"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, + W"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_imlAeCj1ZENGXNHEaK19vqhy","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": + \"S"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an + F"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, + C"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} + + + data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5ea276ada35db-LHR + Connection: + - keep-alive + Content-Type: + - text/event-stream; charset=utf-8 + Date: + - Fri, 08 Nov 2024 13:29:56 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + openai-organization: test_organization + openai-processing-ms: + - '920' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999960' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_85256ce49f10bf2d4c5d78674bfd758c + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml new file mode 100644 index 0000000000..2abc823bcd --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": + "gpt-4", "stream": true, "stream_options": {"include_usage": true}}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '142' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + is"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + test"},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + + + data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":12,"completion_tokens":5,"total_tokens":17,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5ea117b83e1c1-MRS + Connection: + - keep-alive + Content-Type: + - text/event-stream; charset=utf-8 + Date: + - Fri, 08 Nov 2024 13:29:51 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + openai-organization: test_organization + openai-processing-ms: + - '223' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '10000' + x-ratelimit-limit-tokens: + - '1000000' + x-ratelimit-remaining-requests: + - '9999' + x-ratelimit-remaining-tokens: + - '999977' + x-ratelimit-reset-requests: + - 6ms + x-ratelimit-reset-tokens: + - 1ms + x-request-id: + - req_6a1af35b7398ed9b756594f928112eef + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml new file mode 100644 index 0000000000..e1f31e1a33 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml @@ -0,0 +1,112 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": + "gpt-4", "stream": true}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '99' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + is"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + test"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5ea161a645fac-MRS + Connection: + - keep-alive + Content-Type: + - text/event-stream; charset=utf-8 + Date: + - Fri, 08 Nov 2024 13:29:52 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + openai-organization: test_organization + openai-processing-ms: + - '335' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '10000' + x-ratelimit-limit-tokens: + - '1000000' + x-ratelimit-remaining-requests: + - '9999' + x-ratelimit-remaining-tokens: + - '999977' + x-ratelimit-reset-requests: + - 6ms + x-ratelimit-reset-tokens: + - 1ms + x-request-id: + - req_8ea7fd338691ba6019e8467ff1abdd27 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml new file mode 100644 index 0000000000..86cbfa5dbd --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml @@ -0,0 +1,97 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": + "gpt-4o-mini", "stream": false}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '106' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJChxt2fA6Qwd9jsTvVLvEQerDGZ\",\n \"object\": + \"chat.completion\",\n \"created\": 1731072039,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"This is a test.\",\n \"refusal\": + null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n + \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 12,\n \"completion_tokens\": + 5,\n \"total_tokens\": 17,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": + \"fp_0ba0d124f1\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df5dc968fb4e1ac-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:20:40 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '765' + openai-organization: test_organization + openai-processing-ms: + - '327' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999978' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_337e4834bfba3e14ca642a4ffd6d83b6 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py index 899b2f122c..0f01d12d7a 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py @@ -5,7 +5,7 @@ import pytest import yaml -from openai import OpenAI +from openai import AsyncOpenAI, OpenAI from opentelemetry.instrumentation.openai_v2 import OpenAIInstrumentor from opentelemetry.instrumentation.openai_v2.utils import ( @@ -63,6 +63,11 @@ def openai_client(): return OpenAI() +@pytest.fixture +def async_openai_client(): + return AsyncOpenAI() + + @pytest.fixture(scope="module") def vcr_config(): return { diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py new file mode 100644 index 0000000000..01ad704b45 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py @@ -0,0 +1,847 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# pylint: disable=too-many-locals + +from typing import Optional + +import pytest +from openai import APIConnectionError, AsyncOpenAI, NotFoundError +from openai.resources.chat.completions import ChatCompletion + +from opentelemetry.sdk.trace import ReadableSpan +from opentelemetry.semconv._incubating.attributes import ( + error_attributes as ErrorAttributes, +) +from opentelemetry.semconv._incubating.attributes import ( + event_attributes as EventAttributes, +) +from opentelemetry.semconv._incubating.attributes import ( + gen_ai_attributes as GenAIAttributes, +) +from opentelemetry.semconv._incubating.attributes import ( + server_attributes as ServerAttributes, +) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_with_content( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + response = await async_openai_client.chat.completions.create( + messages=messages_value, model=llm_model_value, stream=False + ) + + spans = span_exporter.get_finished_spans() + assert_completion_attributes(spans[0], llm_model_value, response) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 2 + + user_message = {"content": messages_value[0]["content"]} + assert_message_in_logs( + logs[0], "gen_ai.user.message", user_message, spans[0] + ) + + choice_event = { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": response.choices[0].message.content, + }, + } + assert_message_in_logs(logs[1], "gen_ai.choice", choice_event, spans[0]) + + +@pytest.mark.asyncio() +async def test_async_chat_completion_bad_endpoint( + span_exporter, instrument_no_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + client = AsyncOpenAI(base_url="http://localhost:4242") + + with pytest.raises(APIConnectionError): + await client.chat.completions.create( + messages=messages_value, + model=llm_model_value, + timeout=0.1, + ) + + spans = span_exporter.get_finished_spans() + assert_all_attributes( + spans[0], llm_model_value, server_address="localhost" + ) + assert 4242 == spans[0].attributes[ServerAttributes.SERVER_PORT] + assert ( + "APIConnectionError" == spans[0].attributes[ErrorAttributes.ERROR_TYPE] + ) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_404( + span_exporter, async_openai_client, instrument_no_content +): + llm_model_value = "this-model-does-not-exist" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + with pytest.raises(NotFoundError): + await async_openai_client.chat.completions.create( + messages=messages_value, + model=llm_model_value, + ) + + spans = span_exporter.get_finished_spans() + + assert_all_attributes(spans[0], llm_model_value) + assert "NotFoundError" == spans[0].attributes[ErrorAttributes.ERROR_TYPE] + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_extra_params( + span_exporter, async_openai_client, instrument_no_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + response = await async_openai_client.chat.completions.create( + messages=messages_value, + model=llm_model_value, + seed=42, + temperature=0.5, + max_tokens=50, + stream=False, + extra_body={"service_tier": "default"}, + ) + + spans = span_exporter.get_finished_spans() + assert_completion_attributes(spans[0], llm_model_value, response) + assert ( + spans[0].attributes[GenAIAttributes.GEN_AI_OPENAI_REQUEST_SEED] == 42 + ) + assert ( + spans[0].attributes[GenAIAttributes.GEN_AI_REQUEST_TEMPERATURE] == 0.5 + ) + assert spans[0].attributes[GenAIAttributes.GEN_AI_REQUEST_MAX_TOKENS] == 50 + assert ( + spans[0].attributes[GenAIAttributes.GEN_AI_OPENAI_REQUEST_SERVICE_TIER] + == "default" + ) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_multiple_choices( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + response = await async_openai_client.chat.completions.create( + messages=messages_value, model=llm_model_value, n=2, stream=False + ) + + spans = span_exporter.get_finished_spans() + assert_completion_attributes(spans[0], llm_model_value, response) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 3 # 1 user message + 2 choice messages + + user_message = {"content": messages_value[0]["content"]} + assert_message_in_logs( + logs[0], "gen_ai.user.message", user_message, spans[0] + ) + + choice_event_0 = { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": response.choices[0].message.content, + }, + } + assert_message_in_logs(logs[1], "gen_ai.choice", choice_event_0, spans[0]) + + choice_event_1 = { + "index": 1, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": response.choices[1].message.content, + }, + } + assert_message_in_logs(logs[2], "gen_ai.choice", choice_event_1, spans[0]) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_tool_calls_with_content( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + chat_completion_tool_call( + span_exporter, log_exporter, async_openai_client, True + ) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_tool_calls_no_content( + span_exporter, log_exporter, async_openai_client, instrument_no_content +): + chat_completion_tool_call( + span_exporter, log_exporter, async_openai_client, False + ) + + +async def chat_completion_tool_call( + span_exporter, log_exporter, async_openai_client, expect_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [ + {"role": "system", "content": "You're a helpful assistant."}, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?", + }, + ] + + response_0 = await async_openai_client.chat.completions.create( + messages=messages_value, + model=llm_model_value, + tool_choice="auto", + tools=[get_current_weather_tool_definition()], + ) + + # sanity check + assert "tool_calls" in response_0.choices[0].finish_reason + + # final request + messages_value.append( + { + "role": "assistant", + "tool_calls": response_0.choices[0].message.to_dict()[ + "tool_calls" + ], + } + ) + + tool_call_result_0 = { + "role": "tool", + "content": "50 degrees and raining", + "tool_call_id": response_0.choices[0].message.tool_calls[0].id, + } + tool_call_result_1 = { + "role": "tool", + "content": "70 degrees and sunny", + "tool_call_id": response_0.choices[0].message.tool_calls[1].id, + } + + messages_value.append(tool_call_result_0) + messages_value.append(tool_call_result_1) + + response_1 = await async_openai_client.chat.completions.create( + messages=messages_value, model=llm_model_value + ) + + # sanity check + assert "stop" in response_1.choices[0].finish_reason + + # validate both calls + spans = span_exporter.get_finished_spans() + assert len(spans) == 2 + assert_completion_attributes(spans[0], llm_model_value, response_0) + assert_completion_attributes(spans[1], llm_model_value, response_1) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 9 # 3 logs for first completion, 6 for second + + # call one + system_message = ( + {"content": messages_value[0]["content"]} if expect_content else None + ) + assert_message_in_logs( + logs[0], "gen_ai.system.message", system_message, spans[0] + ) + + user_message = ( + {"content": messages_value[1]["content"]} if expect_content else None + ) + assert_message_in_logs( + logs[1], "gen_ai.user.message", user_message, spans[0] + ) + + function_call_0 = {"name": "get_current_weather"} + function_call_1 = {"name": "get_current_weather"} + if expect_content: + function_call_0["arguments"] = ( + response_0.choices[0] + .message.tool_calls[0] + .function.arguments.replace("\n", "") + ) + function_call_1["arguments"] = ( + response_0.choices[0] + .message.tool_calls[1] + .function.arguments.replace("\n", "") + ) + + choice_event = { + "index": 0, + "finish_reason": "tool_calls", + "message": { + "role": "assistant", + "tool_calls": [ + { + "id": response_0.choices[0].message.tool_calls[0].id, + "type": "function", + "function": function_call_0, + }, + { + "id": response_0.choices[0].message.tool_calls[1].id, + "type": "function", + "function": function_call_1, + }, + ], + }, + } + assert_message_in_logs(logs[2], "gen_ai.choice", choice_event, spans[0]) + + # call two + system_message = ( + {"content": messages_value[0]["content"]} if expect_content else None + ) + assert_message_in_logs( + logs[3], "gen_ai.system.message", system_message, spans[1] + ) + + user_message = ( + {"content": messages_value[1]["content"]} if expect_content else None + ) + assert_message_in_logs( + logs[4], "gen_ai.user.message", user_message, spans[1] + ) + + assistant_tool_call = {"tool_calls": messages_value[2]["tool_calls"]} + if not expect_content: + assistant_tool_call["tool_calls"][0]["function"]["arguments"] = None + assistant_tool_call["tool_calls"][1]["function"]["arguments"] = None + + assert_message_in_logs( + logs[5], "gen_ai.assistant.message", assistant_tool_call, spans[1] + ) + + tool_message_0 = { + "id": tool_call_result_0["tool_call_id"], + "content": tool_call_result_0["content"] if expect_content else None, + } + + assert_message_in_logs( + logs[6], "gen_ai.tool.message", tool_message_0, spans[1] + ) + + tool_message_1 = { + "id": tool_call_result_1["tool_call_id"], + "content": tool_call_result_1["content"] if expect_content else None, + } + + assert_message_in_logs( + logs[7], "gen_ai.tool.message", tool_message_1, spans[1] + ) + + message = { + "role": "assistant", + "content": response_1.choices[0].message.content + if expect_content + else None, + } + choice = { + "index": 0, + "finish_reason": "stop", + "message": message, + } + assert_message_in_logs(logs[8], "gen_ai.choice", choice, spans[1]) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_streaming( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + llm_model_value = "gpt-4" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + kwargs = { + "model": llm_model_value, + "messages": messages_value, + "stream": True, + "stream_options": {"include_usage": True}, + } + + response_stream_usage = None + response_stream_model = None + response_stream_id = None + response_stream_result = "" + response = await async_openai_client.chat.completions.create(**kwargs) + async for chunk in response: + if chunk.choices: + response_stream_result += chunk.choices[0].delta.content or "" + + # get the last chunk + if getattr(chunk, "usage", None): + response_stream_usage = chunk.usage + response_stream_model = chunk.model + response_stream_id = chunk.id + + spans = span_exporter.get_finished_spans() + assert_all_attributes( + spans[0], + llm_model_value, + response_stream_id, + response_stream_model, + response_stream_usage.prompt_tokens, + response_stream_usage.completion_tokens, + ) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 2 + + user_message = {"content": "Say this is a test"} + assert_message_in_logs( + logs[0], "gen_ai.user.message", user_message, spans[0] + ) + + choice_event = { + "index": 0, + "finish_reason": "stop", + "message": {"role": "assistant", "content": response_stream_result}, + } + assert_message_in_logs(logs[1], "gen_ai.choice", choice_event, spans[0]) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_streaming_not_complete( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + llm_model_value = "gpt-4" + messages_value = [{"role": "user", "content": "Say this is a test"}] + + kwargs = { + "model": llm_model_value, + "messages": messages_value, + "stream": True, + } + + response_stream_model = None + response_stream_id = None + response_stream_result = "" + response = await async_openai_client.chat.completions.create(**kwargs) + idx = 0 + async for chunk in response: + if chunk.choices: + response_stream_result += chunk.choices[0].delta.content or "" + if idx == 1: + # fake a stop + break + + if chunk.model: + response_stream_model = chunk.model + if chunk.id: + response_stream_id = chunk.id + idx += 1 + + response.close() + spans = span_exporter.get_finished_spans() + assert_all_attributes( + spans[0], llm_model_value, response_stream_id, response_stream_model + ) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 2 + + user_message = {"content": "Say this is a test"} + assert_message_in_logs( + logs[0], "gen_ai.user.message", user_message, spans[0] + ) + + choice_event = { + "index": 0, + "finish_reason": "error", + "message": {"role": "assistant", "content": response_stream_result}, + } + assert_message_in_logs(logs[1], "gen_ai.choice", choice_event, spans[0]) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_multiple_choices_streaming( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [ + {"role": "system", "content": "You're a helpful assistant."}, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?", + }, + ] + + response_0 = await async_openai_client.chat.completions.create( + messages=messages_value, + model=llm_model_value, + n=2, + stream=True, + stream_options={"include_usage": True}, + ) + + # two strings for each choice + response_stream_result = ["", ""] + finish_reasons = ["", ""] + async for chunk in response_0: + if chunk.choices: + for choice in chunk.choices: + response_stream_result[choice.index] += ( + choice.delta.content or "" + ) + if choice.finish_reason: + finish_reasons[choice.index] = choice.finish_reason + + # get the last chunk + if getattr(chunk, "usage", None): + response_stream_usage = chunk.usage + response_stream_model = chunk.model + response_stream_id = chunk.id + + # sanity check + assert "stop" == finish_reasons[0] + + spans = span_exporter.get_finished_spans() + assert_all_attributes( + spans[0], + llm_model_value, + response_stream_id, + response_stream_model, + response_stream_usage.prompt_tokens, + response_stream_usage.completion_tokens, + ) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 4 + + system_message = {"content": messages_value[0]["content"]} + assert_message_in_logs( + logs[0], "gen_ai.system.message", system_message, spans[0] + ) + + user_message = { + "content": "What's the weather in Seattle and San Francisco today?" + } + assert_message_in_logs( + logs[1], "gen_ai.user.message", user_message, spans[0] + ) + + choice_event_0 = { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "".join(response_stream_result[0]), + }, + } + assert_message_in_logs(logs[2], "gen_ai.choice", choice_event_0, spans[0]) + + choice_event_1 = { + "index": 1, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "".join(response_stream_result[1]), + }, + } + assert_message_in_logs(logs[3], "gen_ai.choice", choice_event_1, spans[0]) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_multiple_tools_streaming_with_content( + span_exporter, log_exporter, async_openai_client, instrument_with_content +): + await async_chat_completion_multiple_tools_streaming( + span_exporter, log_exporter, async_openai_client, True + ) + + +@pytest.mark.vcr() +@pytest.mark.asyncio() +async def test_async_chat_completion_multiple_tools_streaming_no_content( + span_exporter, log_exporter, async_openai_client, instrument_no_content +): + await async_chat_completion_multiple_tools_streaming( + span_exporter, log_exporter, async_openai_client, False + ) + + +async def async_chat_completion_multiple_tools_streaming( + span_exporter, log_exporter, async_openai_client, expect_content +): + llm_model_value = "gpt-4o-mini" + messages_value = [ + {"role": "system", "content": "You're a helpful assistant."}, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?", + }, + ] + + response = await async_openai_client.chat.completions.create( + messages=messages_value, + model=llm_model_value, + tool_choice="auto", + tools=[get_current_weather_tool_definition()], + stream=True, + stream_options={"include_usage": True}, + ) + + finish_reason = None + # two tools + tool_names = ["", ""] + tool_call_ids = ["", ""] + tool_args = ["", ""] + async for chunk in response: + if chunk.choices: + if chunk.choices[0].finish_reason: + finish_reason = chunk.choices[0].finish_reason + for tool_call in chunk.choices[0].delta.tool_calls or []: + t_idx = tool_call.index + if tool_call.id: + tool_call_ids[t_idx] = tool_call.id + if tool_call.function: + if tool_call.function.arguments: + tool_args[t_idx] += tool_call.function.arguments + if tool_call.function.name: + tool_names[t_idx] = tool_call.function.name + + # get the last chunk + if getattr(chunk, "usage", None): + response_stream_usage = chunk.usage + response_stream_model = chunk.model + response_stream_id = chunk.id + + # sanity check + assert "tool_calls" == finish_reason + + spans = span_exporter.get_finished_spans() + assert_all_attributes( + spans[0], + llm_model_value, + response_stream_id, + response_stream_model, + response_stream_usage.prompt_tokens, + response_stream_usage.completion_tokens, + ) + + logs = log_exporter.get_finished_logs() + assert len(logs) == 3 + + system_message = ( + {"content": messages_value[0]["content"]} if expect_content else None + ) + assert_message_in_logs( + logs[0], "gen_ai.system.message", system_message, spans[0] + ) + + user_message = ( + {"content": "What's the weather in Seattle and San Francisco today?"} + if expect_content + else None + ) + assert_message_in_logs( + logs[1], "gen_ai.user.message", user_message, spans[0] + ) + + choice_event = { + "index": 0, + "finish_reason": "tool_calls", + "message": { + "role": "assistant", + "tool_calls": [ + { + "id": tool_call_ids[0], + "type": "function", + "function": { + "name": tool_names[0], + "arguments": ( + tool_args[0].replace("\n", "") + if expect_content + else None + ), + }, + }, + { + "id": tool_call_ids[1], + "type": "function", + "function": { + "name": tool_names[1], + "arguments": ( + tool_args[1].replace("\n", "") + if expect_content + else None + ), + }, + }, + ], + }, + } + assert_message_in_logs(logs[2], "gen_ai.choice", choice_event, spans[0]) + + +def assert_message_in_logs(log, event_name, expected_content, parent_span): + assert log.log_record.attributes[EventAttributes.EVENT_NAME] == event_name + assert ( + log.log_record.attributes[GenAIAttributes.GEN_AI_SYSTEM] + == GenAIAttributes.GenAiSystemValues.OPENAI.value + ) + + if not expected_content: + assert not log.log_record.body + else: + assert log.log_record.body + assert dict(log.log_record.body) == remove_none_values( + expected_content + ) + assert_log_parent(log, parent_span) + + +def remove_none_values(body): + result = {} + for key, value in body.items(): + if value is None: + continue + if isinstance(value, dict): + result[key] = remove_none_values(value) + elif isinstance(value, list): + result[key] = [remove_none_values(i) for i in value] + else: + result[key] = value + return result + + +def assert_completion_attributes( + span: ReadableSpan, + request_model: str, + response: ChatCompletion, + operation_name: str = "chat", + server_address: str = "api.openai.com", +): + return assert_all_attributes( + span, + request_model, + response.id, + response.model, + response.usage.prompt_tokens, + response.usage.completion_tokens, + operation_name, + server_address, + ) + + +def assert_all_attributes( + span: ReadableSpan, + request_model: str, + response_id: str = None, + response_model: str = None, + input_tokens: Optional[int] = None, + output_tokens: Optional[int] = None, + operation_name: str = "chat", + server_address: str = "api.openai.com", +): + assert span.name == f"{operation_name} {request_model}" + assert ( + operation_name + == span.attributes[GenAIAttributes.GEN_AI_OPERATION_NAME] + ) + assert ( + GenAIAttributes.GenAiSystemValues.OPENAI.value + == span.attributes[GenAIAttributes.GEN_AI_SYSTEM] + ) + assert ( + request_model == span.attributes[GenAIAttributes.GEN_AI_REQUEST_MODEL] + ) + if response_model: + assert ( + response_model + == span.attributes[GenAIAttributes.GEN_AI_RESPONSE_MODEL] + ) + else: + assert GenAIAttributes.GEN_AI_RESPONSE_MODEL not in span.attributes + + if response_id: + assert ( + response_id == span.attributes[GenAIAttributes.GEN_AI_RESPONSE_ID] + ) + else: + assert GenAIAttributes.GEN_AI_RESPONSE_ID not in span.attributes + + if input_tokens: + assert ( + input_tokens + == span.attributes[GenAIAttributes.GEN_AI_USAGE_INPUT_TOKENS] + ) + else: + assert GenAIAttributes.GEN_AI_USAGE_INPUT_TOKENS not in span.attributes + + if output_tokens: + assert ( + output_tokens + == span.attributes[GenAIAttributes.GEN_AI_USAGE_OUTPUT_TOKENS] + ) + else: + assert ( + GenAIAttributes.GEN_AI_USAGE_OUTPUT_TOKENS not in span.attributes + ) + + assert server_address == span.attributes[ServerAttributes.SERVER_ADDRESS] + + +def assert_log_parent(log, span): + assert log.log_record.trace_id == span.get_span_context().trace_id + assert log.log_record.span_id == span.get_span_context().span_id + assert log.log_record.trace_flags == span.get_span_context().trace_flags + + +def get_current_weather_tool_definition(): + return { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. Boston, MA", + }, + }, + "required": ["location"], + "additionalProperties": False, + }, + }, + } From a377334d5479f4b09c450122ff86f5eb8fa3cd3a Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Fri, 8 Nov 2024 16:00:40 +0200 Subject: [PATCH 13/20] fix tests runtime warnings --- ...chat_completion_tool_calls_no_content.yaml | 215 ++++++++++++++++++ ...at_completion_tool_calls_with_content.yaml | 215 ++++++++++++++++++ .../tests/test_async_chat_completions.py | 4 +- 3 files changed, 432 insertions(+), 2 deletions(-) create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml create mode 100644 instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml new file mode 100644 index 0000000000..3aa63d6215 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml @@ -0,0 +1,215 @@ +interactions: +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}], "model": "gpt-4o-mini", "tool_choice": "auto", "tools": [{"type": + "function", "function": {"name": "get_current_weather", "description": "Get + the current weather in a given location", "parameters": {"type": "object", "properties": + {"location": {"type": "string", "description": "The city and state, e.g. Boston, + MA"}}, "required": ["location"], "additionalProperties": false}}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '543' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJkWSl3FJCaxY2M5c1mIZXvCkIb0\",\n \"object\": + \"chat.completion\",\n \"created\": 1731074136,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n + \ \"id\": \"call_Hmg9bHwsiXUofekPckiN91TS\",\n \"type\": + \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n + \ \"arguments\": \"{\\\"location\\\": \\\"Seattle, WA\\\"}\"\n + \ }\n },\n {\n \"id\": \"call_75j1tY784nud9uU0kR9r0lfN\",\n + \ \"type\": \"function\",\n \"function\": {\n \"name\": + \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\": + \\\"San Francisco, CA\\\"}\"\n }\n }\n ],\n \"refusal\": + null\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n + \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 75,\n \"completion_tokens\": + 51,\n \"total_tokens\": 126,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": + \"fp_0ba0d124f1\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df60fc96b19e27a-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:55:37 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '1308' + openai-organization: test_organization + openai-processing-ms: + - '1022' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999960' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_34ca1c97461dd1272256b64988bd56ff + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}, {"role": "assistant", "tool_calls": [{"id": "call_Hmg9bHwsiXUofekPckiN91TS", + "function": {"arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather"}, + "type": "function"}, {"id": "call_75j1tY784nud9uU0kR9r0lfN", "function": {"arguments": + "{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather"}, "type": + "function"}]}, {"role": "tool", "content": "50 degrees and raining", "tool_call_id": + "call_Hmg9bHwsiXUofekPckiN91TS"}, {"role": "tool", "content": "70 degrees and + sunny", "tool_call_id": "call_75j1tY784nud9uU0kR9r0lfN"}], "model": "gpt-4o-mini"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '746' + content-type: + - application/json + cookie: + - __cf_bm=9IFaLwbVtK7uOEFE2dslUkFDFTCFSZEUsU3yr6pZ_3I-1731074137-1.0.1.1-3uYq4aPispFdfxboed6vtN_eKem1xnkFZrlgg2PtlQbpidFIlCI11ZDKeF5k0OAI3Nh0sv_WoFbVqx22I2JsEQ; + _cfuvid=5bL_g45Wr1SP1uqQC1y2L.xbhNhBsaU4gvhrperwPYY-1731074137720-0.0.1.1-604800000 + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJkXLOI2fMtY8OJk08OqQ957oW12\",\n \"object\": + \"chat.completion\",\n \"created\": 1731074137,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Today, the weather in Seattle is 50 + degrees and raining, while in San Francisco, it's 70 degrees and sunny.\",\n + \ \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\": + \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 99,\n \"completion_tokens\": + 25,\n \"total_tokens\": 124,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": + \"fp_0ba0d124f1\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df60fd12862e27a-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:55:38 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '859' + openai-organization: test_organization + openai-processing-ms: + - '625' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999948' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_7f3194ba56f6e84bfbec244bc9e697c7 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml new file mode 100644 index 0000000000..6400ac8fd1 --- /dev/null +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml @@ -0,0 +1,215 @@ +interactions: +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}], "model": "gpt-4o-mini", "tool_choice": "auto", "tools": [{"type": + "function", "function": {"name": "get_current_weather", "description": "Get + the current weather in a given location", "parameters": {"type": "object", "properties": + {"location": {"type": "string", "description": "The city and state, e.g. Boston, + MA"}}, "required": ["location"], "additionalProperties": false}}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '543' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJkUajohZiNR9Hzjp4jHsZeyLTXn\",\n \"object\": + \"chat.completion\",\n \"created\": 1731074134,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n + \ \"id\": \"call_gdXlzxsJq8bgV6vDy52d8r0N\",\n \"type\": + \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n + \ \"arguments\": \"{\\\"location\\\": \\\"Seattle, WA\\\"}\"\n + \ }\n },\n {\n \"id\": \"call_EZyypeD7zIcuVG0NisQ36VB7\",\n + \ \"type\": \"function\",\n \"function\": {\n \"name\": + \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\": + \\\"San Francisco, CA\\\"}\"\n }\n }\n ],\n \"refusal\": + null\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n + \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 75,\n \"completion_tokens\": + 51,\n \"total_tokens\": 126,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": + \"fp_0ba0d124f1\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df60fbb4f0241f0-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:55:35 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '1308' + openai-organization: test_organization + openai-processing-ms: + - '1079' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999960' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_9a5a4e89cc266daf5008b64ed5fbaf07 + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, + {"role": "user", "content": "What''s the weather in Seattle and San Francisco + today?"}, {"role": "assistant", "tool_calls": [{"id": "call_gdXlzxsJq8bgV6vDy52d8r0N", + "function": {"arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather"}, + "type": "function"}, {"id": "call_EZyypeD7zIcuVG0NisQ36VB7", "function": {"arguments": + "{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather"}, "type": + "function"}]}, {"role": "tool", "content": "50 degrees and raining", "tool_call_id": + "call_gdXlzxsJq8bgV6vDy52d8r0N"}, {"role": "tool", "content": "70 degrees and + sunny", "tool_call_id": "call_EZyypeD7zIcuVG0NisQ36VB7"}], "model": "gpt-4o-mini"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '746' + content-type: + - application/json + cookie: + - __cf_bm=uccQyWNZnSUT3NfE7TrDr_Qb0pJi0nCetLcHgpqvZF4-1731074135-1.0.1.1-4fj4Re6hs6myrY4O5hYugP5kze7SKj3Eko74XDuaa7v5m8Ox3IYtFrIA70lT3UfqeBWlyCtoP9iqxCgnaHDZQg; + _cfuvid=QOd1Lms.2nqAQl0cUyMCL.bGypkci3yI8gFdpnO9qp4-1731074135646-0.0.1.1-604800000 + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.26.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.26.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.12.5 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-ARJkVEHUtbthDFKhPrCrM08EwO42n\",\n \"object\": + \"chat.completion\",\n \"created\": 1731074135,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Today, the weather in Seattle is 50 + degrees and raining, while in San Francisco, it is 70 degrees and sunny.\",\n + \ \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\": + \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 99,\n \"completion_tokens\": + 26,\n \"total_tokens\": 125,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": + \"fp_0ba0d124f1\"\n}\n" + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8df60fc439ad41f0-MRS + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Fri, 08 Nov 2024 13:55:36 GMT + Server: + - cloudflare + Set-Cookie: test_set_cookie + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '860' + openai-organization: test_organization + openai-processing-ms: + - '490' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '150000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '149999948' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + x-request-id: + - req_efe88734f57b290d25873df3c75aa3d1 + status: + code: 200 + message: OK +version: 1 diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py index 01ad704b45..1c4b3cb7dd 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py @@ -196,7 +196,7 @@ async def test_async_chat_completion_multiple_choices( async def test_async_chat_completion_tool_calls_with_content( span_exporter, log_exporter, async_openai_client, instrument_with_content ): - chat_completion_tool_call( + await chat_completion_tool_call( span_exporter, log_exporter, async_openai_client, True ) @@ -206,7 +206,7 @@ async def test_async_chat_completion_tool_calls_with_content( async def test_async_chat_completion_tool_calls_no_content( span_exporter, log_exporter, async_openai_client, instrument_no_content ): - chat_completion_tool_call( + await chat_completion_tool_call( span_exporter, log_exporter, async_openai_client, False ) From 2037ecc23c02dccc813b5ba87b28d11dd03101f6 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Sat, 9 Nov 2024 14:08:59 +0200 Subject: [PATCH 14/20] add changelog --- .../opentelemetry-instrumentation-openai-v2/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md index 2fdeeea74f..998534cbbf 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Added a wrapper for `AsyncCompletions.create` inside `src/opentelemetry/instrumentation/openai_v2/__init__.py` to instrument async chat completions +- Created a new patch function for async chat completions +- Abstracted handling span exceptions into it's own function as it was getting used in multiple places +- Adjusted `StreamWrapper` to include async methods for supporting async streaming +- Added Tests using `pytest-asyncio` fixtures + ## Version 2.0b0 (2024-11-08) - Use generic `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` environment variable From dfe602dcdc26780b26fd9451eb91ec0ff82c6feb Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Mon, 11 Nov 2024 14:02:48 +0200 Subject: [PATCH 15/20] relax changelog & adjust conftest --- .../CHANGELOG.md | 6 +- .../test_async_chat_completion_404.yaml | 30 +- ...st_async_chat_completion_extra_params.yaml | 73 ++- ...sync_chat_completion_multiple_choices.yaml | 83 +++- ...completion_multiple_choices_streaming.yaml | 424 +++++------------- ...n_multiple_tools_streaming_no_content.yaml | 119 ++--- ...multiple_tools_streaming_with_content.yaml | 119 ++--- .../test_async_chat_completion_streaming.yaml | 54 +-- ...hat_completion_streaming_not_complete.yaml | 48 +- ...chat_completion_tool_calls_no_content.yaml | 238 +++++++--- ...at_completion_tool_calls_with_content.yaml | 238 +++++++--- ...st_async_chat_completion_with_content.yaml | 69 ++- 12 files changed, 850 insertions(+), 651 deletions(-) diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md index 998534cbbf..7dd3b58558 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md @@ -7,11 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -- Added a wrapper for `AsyncCompletions.create` inside `src/opentelemetry/instrumentation/openai_v2/__init__.py` to instrument async chat completions -- Created a new patch function for async chat completions -- Abstracted handling span exceptions into it's own function as it was getting used in multiple places -- Adjusted `StreamWrapper` to include async methods for supporting async streaming -- Added Tests using `pytest-asyncio` fixtures +- Support for `AsyncOpenAI/AsyncCompletions` ## Version 2.0b0 (2024-11-08) diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml index d21ef48ac7..3eb8efc2ce 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml @@ -1,7 +1,15 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "this-model-does-not-exist"}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "this-model-does-not-exist" + } headers: accept: - application/json @@ -35,20 +43,26 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"error\": {\n \"message\": \"The model `this-model-does-not-exist` - does not exist or you do not have access to it.\",\n \"type\": \"invalid_request_error\",\n - \ \"param\": null,\n \"code\": \"model_not_found\"\n }\n}\n" + string: |- + { + "error": { + "message": "The model `this-model-does-not-exist` does not exist or you do not have access to it.", + "type": "invalid_request_error", + "param": null, + "code": "model_not_found" + } + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5e31d6e45e284-MRS + - 8e0e20160ec6e17f-MRS Connection: - keep-alive Content-Type: - application/json; charset=utf-8 Date: - - Fri, 08 Nov 2024 13:25:06 GMT + - Mon, 11 Nov 2024 12:01:02 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -66,7 +80,7 @@ interactions: vary: - Origin x-request-id: - - req_82c60ab486740fa07db9b846df2d532b + - req_93d359c0eeba1f2be7308d9132e82bf5 status: code: 404 message: Not Found diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml index 18dd64f971..75989a29bc 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml @@ -1,8 +1,20 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "gpt-4o-mini", "max_tokens": 50, "seed": 42, "stream": false, "temperature": - 0.5, "service_tier": "default"}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "gpt-4o-mini", + "max_tokens": 50, + "seed": 42, + "stream": false, + "temperature": 0.5, + "service_tier": "default" + } headers: accept: - application/json @@ -36,28 +48,53 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJJHh1NYn4MAJ5vmO2u6MC0QWvS3\",\n \"object\": - \"chat.completion\",\n \"created\": 1731072447,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"This is a test. How can I assist you - further?\",\n \"refusal\": null\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 12,\n \"completion_tokens\": 12,\n \"total_tokens\": 24,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_0ba0d124f1\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNOJZk6WBJTYWmACy5zBiYnkvXAw", + "object": "chat.completion", + "created": 1731326463, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "This is a test. How can I assist you further?", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12, + "completion_tokens": 12, + "total_tokens": 24, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5e68e7df7e20d-MRS + - 8e0e20191e7670e7-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:27:28 GMT + - Mon, 11 Nov 2024 12:01:03 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -73,7 +110,7 @@ interactions: - '825' openai-organization: test_organization openai-processing-ms: - - '373' + - '483' openai-version: - '2020-10-01' strict-transport-security: @@ -91,7 +128,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_bea7292421fe218c0a9e158dbb7699d7 + - req_bbcd55fb3044f058ea9f9ae8a388698d status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml index 803216aa1b..e38e5c13f0 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml @@ -1,7 +1,17 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "gpt-4o-mini", "n": 2, "stream": false}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "gpt-4o-mini", + "n": 2, + "stream": false + } headers: accept: - application/json @@ -35,31 +45,62 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJJITAE6LSpkhJ4F6Lkgx1hjMWce\",\n \"object\": - \"chat.completion\",\n \"created\": 1731072448,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"This is a test.\",\n \"refusal\": - null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n - \ },\n {\n \"index\": 1,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"This is a test. How can I assist you - further?\",\n \"refusal\": null\n },\n \"logprobs\": null,\n - \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 12,\n \"completion_tokens\": 17,\n \"total_tokens\": 29,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_9b78b61c52\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNOJmzXWHqTArL7xMAtIJhIuu46p", + "object": "chat.completion", + "created": 1731326463, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "This is a test! How can I assist you further?", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + }, + { + "index": 1, + "message": { + "role": "assistant", + "content": "This is a test. How can I assist you further?", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12, + "completion_tokens": 24, + "total_tokens": 36, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5e692e8c9129a-MRS + - 8e0e201e3de30771-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:27:29 GMT + - Mon, 11 Nov 2024 12:01:04 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -72,10 +113,10 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '1000' + - '1030' openai-organization: test_organization openai-processing-ms: - - '404' + - '373' openai-version: - '2020-10-01' strict-transport-security: @@ -93,7 +134,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_7d77cf85328e6feb1d9c2d52f2a69cfb + - req_d1f29830c9ae2a48e896be67a1edcfd6 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml index 3ebcfc9909..162e6b0a54 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml @@ -1,9 +1,24 @@ interactions: - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}], "model": "gpt-4o-mini", "n": 2, "stream": true, "stream_options": - {"include_usage": true}}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + } + ], + "model": "gpt-4o-mini", + "n": 2, + "stream": true, + "stream_options": { + "include_usage": true + } + } headers: accept: - application/json @@ -37,411 +52,210 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + string: |+ + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"I'm"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"I"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"I'm"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" unable"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" unable"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"I''m"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - don''t"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" provide"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" provide"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - sorry"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" real"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" real"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - have"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - real"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" updates"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" like"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - but"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" However"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - I"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" conditions"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - capabilities"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" you"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - to"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" can"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" To"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - check"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" easily"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" get"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" check"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - don''t"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" most"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - have"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" accurate"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - access"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - to"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" up"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - current"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - real"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" San"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" using"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-to"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-date"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - data"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - However"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" San"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" website"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - including"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - I"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" mobile"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" I"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - current"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" app"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" recommend"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - recommend"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" checking"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" If"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - checking"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" you"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" reliable"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - updates"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" need"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" historical"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" website"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - reliable"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" app"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - I"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" general"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" climate"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - recommend"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" patterns"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - website"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" these"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" cities"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - checking"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" feel"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - or"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" free"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" ask"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - app"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - reliable"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - for"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - website"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - latest"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - or"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - app"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - updates"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - for"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - in"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - latest"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - and"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - forecasts"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - San"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - for"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - and"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - Websites"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - San"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" - Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - like"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - Weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":".com"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - National"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - Weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - Service"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - or"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - apps"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - on"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - your"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - smartphone"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - should"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - provide"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - you"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - with"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - accurate"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - and"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - up"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-to"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-date"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" - information"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - - - data: {"id":"chatcmpl-ARJLdqNAuIqmPEHJxwk43mGD1kgOc","object":"chat.completion.chunk","created":1731072593,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":26,"completion_tokens":98,"total_tokens":124,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} - + data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":26,"completion_tokens":90,"total_tokens":116,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5ea1bbe311858-MRS + - 8e0e204eeffee22f-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Fri, 08 Nov 2024 13:29:53 GMT + - Mon, 11 Nov 2024 12:01:11 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -455,7 +269,7 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '141' + - '221' openai-version: - '2020-10-01' strict-transport-security: @@ -473,7 +287,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_7e5fb27046bd51744452679772149d45 + - req_57123afa9a5d1ae1abe38ebd3799be22 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml index b09e1ceb9f..44d4c526fb 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml @@ -1,13 +1,46 @@ interactions: - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}], "model": "gpt-4o-mini", "stream": true, "stream_options": {"include_usage": - true}, "tool_choice": "auto", "tools": [{"type": "function", "function": {"name": - "get_current_weather", "description": "Get the current weather in a given location", - "parameters": {"type": "object", "properties": {"location": {"type": "string", - "description": "The city and state, e.g. Boston, MA"}}, "required": ["location"], - "additionalProperties": false}}}]}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + } + ], + "model": "gpt-4o-mini", + "stream": true, + "stream_options": { + "include_usage": true + }, + "tool_choice": "auto", + "tools": [ + { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. Boston, MA" + } + }, + "required": [ + "location" + ], + "additionalProperties": false + } + } + } + ] + } headers: accept: - application/json @@ -41,80 +74,56 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + string: |+ + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_GuNfPyHYLpR7NxIAFU7YlEdw","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_5Maqr8qm7jHMMZLQEtaeQZ7E","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, W"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": - \"S"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_GIc62d1Svd9d2BW8WEVc3VJy","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, - W"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an F"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, C"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_Tfs3ahuPFNggkm8nBav8YkLm","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": - \"S"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an - F"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, - C"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} - - - data: {"id":"chatcmpl-ARJLgGdsRxj6wab3zUmvF0jMsOmaN","object":"chat.completion.chunk","created":1731072596,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} + data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5ea2f9dd16404-LHR + - 8e0e20624d7fe280-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Fri, 08 Nov 2024 13:29:57 GMT + - Mon, 11 Nov 2024 12:01:15 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -128,7 +137,7 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '897' + - '1064' openai-version: - '2020-10-01' strict-transport-security: @@ -146,7 +155,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_443646b762c7e28f71ae8700526e59a6 + - req_7029e07196e4747502b310aa5b43a3b8 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml index bee1ef60c3..d3ea956936 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml @@ -1,13 +1,46 @@ interactions: - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}], "model": "gpt-4o-mini", "stream": true, "stream_options": {"include_usage": - true}, "tool_choice": "auto", "tools": [{"type": "function", "function": {"name": - "get_current_weather", "description": "Get the current weather in a given location", - "parameters": {"type": "object", "properties": {"location": {"type": "string", - "description": "The city and state, e.g. Boston, MA"}}, "required": ["location"], - "additionalProperties": false}}}]}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + } + ], + "model": "gpt-4o-mini", + "stream": true, + "stream_options": { + "include_usage": true + }, + "tool_choice": "auto", + "tools": [ + { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. Boston, MA" + } + }, + "required": [ + "location" + ], + "additionalProperties": false + } + } + } + ] + } headers: accept: - application/json @@ -41,80 +74,56 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + string: |+ + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_LIALtixlXYDOoaybI8QLNpU4","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_qVaxkDwCBrNXL42bTYTo4OXj","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, W"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": - \"S"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_DpuejD0bu1DeP4VTKxL2HpPC","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, - W"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an F"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, C"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_imlAeCj1ZENGXNHEaK19vqhy","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": - \"S"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an - F"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, - C"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} - - - data: {"id":"chatcmpl-ARJLfHfM4KMkNrIEm3mhowNd4yQHE","object":"chat.completion.chunk","created":1731072595,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} + data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5ea276ada35db-LHR + - 8e0e2058fe8c0d81-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Fri, 08 Nov 2024 13:29:56 GMT + - Mon, 11 Nov 2024 12:01:14 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -128,7 +137,7 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '920' + - '1012' openai-version: - '2020-10-01' strict-transport-security: @@ -146,7 +155,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_85256ce49f10bf2d4c5d78674bfd758c + - req_65a1bd511c6ef6a75a9b7366f1317482 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml index 2abc823bcd..216ab48b55 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml @@ -1,7 +1,19 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "gpt-4", "stream": true, "stream_options": {"include_usage": true}}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "gpt-4", + "stream": true, + "stream_options": { + "include_usage": true + } + } headers: accept: - application/json @@ -35,48 +47,36 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + string: |+ + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - is"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - test"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - - - data: {"id":"chatcmpl-ARJLbnYAA0omuMqTYIFav5ZkGbBRp","object":"chat.completion.chunk","created":1731072591,"model":"gpt-4-0613","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":12,"completion_tokens":5,"total_tokens":17,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":12,"completion_tokens":5,"total_tokens":17,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5ea117b83e1c1-MRS + - 8e0e20406aace20d-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Fri, 08 Nov 2024 13:29:51 GMT + - Mon, 11 Nov 2024 12:01:09 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -90,7 +90,7 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '223' + - '245' openai-version: - '2020-10-01' strict-transport-security: @@ -108,7 +108,7 @@ interactions: x-ratelimit-reset-tokens: - 1ms x-request-id: - - req_6a1af35b7398ed9b756594f928112eef + - req_993220d84b3aa412d9df9f93837c50e0 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml index e1f31e1a33..0360d6a33b 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml @@ -1,7 +1,16 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "gpt-4", "stream": true}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "gpt-4", + "stream": true + } headers: accept: - application/json @@ -35,45 +44,34 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + string: |+ + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - is"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - test"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-ARJLcQGjLoxd4RDihfQqvDDKcOi7u","object":"chat.completion.chunk","created":1731072592,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} - + data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5ea161a645fac-MRS + - 8e0e2048ef0470f2-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Fri, 08 Nov 2024 13:29:52 GMT + - Mon, 11 Nov 2024 12:01:11 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -87,7 +85,7 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '335' + - '285' openai-version: - '2020-10-01' strict-transport-security: @@ -105,7 +103,7 @@ interactions: x-ratelimit-reset-tokens: - 1ms x-request-id: - - req_8ea7fd338691ba6019e8467ff1abdd27 + - req_ba80443b4e602a536744861d19540ef0 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml index 3aa63d6215..77ffea5754 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml @@ -1,12 +1,42 @@ interactions: - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}], "model": "gpt-4o-mini", "tool_choice": "auto", "tools": [{"type": - "function", "function": {"name": "get_current_weather", "description": "Get - the current weather in a given location", "parameters": {"type": "object", "properties": - {"location": {"type": "string", "description": "The city and state, e.g. Boston, - MA"}}, "required": ["location"], "additionalProperties": false}}}]}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + } + ], + "model": "gpt-4o-mini", + "tool_choice": "auto", + "tools": [ + { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. Boston, MA" + } + }, + "required": [ + "location" + ], + "additionalProperties": false + } + } + } + ] + } headers: accept: - application/json @@ -40,35 +70,70 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJkWSl3FJCaxY2M5c1mIZXvCkIb0\",\n \"object\": - \"chat.completion\",\n \"created\": 1731074136,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n - \ \"id\": \"call_Hmg9bHwsiXUofekPckiN91TS\",\n \"type\": - \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n - \ \"arguments\": \"{\\\"location\\\": \\\"Seattle, WA\\\"}\"\n - \ }\n },\n {\n \"id\": \"call_75j1tY784nud9uU0kR9r0lfN\",\n - \ \"type\": \"function\",\n \"function\": {\n \"name\": - \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\": - \\\"San Francisco, CA\\\"}\"\n }\n }\n ],\n \"refusal\": - null\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 75,\n \"completion_tokens\": - 51,\n \"total_tokens\": 126,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0ba0d124f1\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNONBA9uswbK7owOLA7k5HTTgOse", + "object": "chat.completion", + "created": 1731326467, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_REDH25T3s3BBdVf8V2uV60Id", + "type": "function", + "function": { + "name": "get_current_weather", + "arguments": "{\"location\": \"Seattle, WA\"}" + } + }, + { + "id": "call_15HrYApUn2NsS5kYqA4JPoIu", + "type": "function", + "function": { + "name": "get_current_weather", + "arguments": "{\"location\": \"San Francisco, CA\"}" + } + } + ], + "refusal": null + }, + "logprobs": null, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 75, + "completion_tokens": 51, + "total_tokens": 126, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df60fc96b19e27a-MRS + - 8e0e2032b88ee1c0-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:55:37 GMT + - Mon, 11 Nov 2024 12:01:08 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -84,7 +149,7 @@ interactions: - '1308' openai-organization: test_organization openai-processing-ms: - - '1022' + - '879' openai-version: - '2020-10-01' strict-transport-security: @@ -102,20 +167,56 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_34ca1c97461dd1272256b64988bd56ff + - req_8911f9733855181d5f9f10c22ef3ee0b status: code: 200 message: OK - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}, {"role": "assistant", "tool_calls": [{"id": "call_Hmg9bHwsiXUofekPckiN91TS", - "function": {"arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather"}, - "type": "function"}, {"id": "call_75j1tY784nud9uU0kR9r0lfN", "function": {"arguments": - "{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather"}, "type": - "function"}]}, {"role": "tool", "content": "50 degrees and raining", "tool_call_id": - "call_Hmg9bHwsiXUofekPckiN91TS"}, {"role": "tool", "content": "70 degrees and - sunny", "tool_call_id": "call_75j1tY784nud9uU0kR9r0lfN"}], "model": "gpt-4o-mini"}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + }, + { + "role": "assistant", + "tool_calls": [ + { + "id": "call_REDH25T3s3BBdVf8V2uV60Id", + "function": { + "arguments": "{\"location\": \"Seattle, WA\"}", + "name": "get_current_weather" + }, + "type": "function" + }, + { + "id": "call_15HrYApUn2NsS5kYqA4JPoIu", + "function": { + "arguments": "{\"location\": \"San Francisco, CA\"}", + "name": "get_current_weather" + }, + "type": "function" + } + ] + }, + { + "role": "tool", + "content": "50 degrees and raining", + "tool_call_id": "call_REDH25T3s3BBdVf8V2uV60Id" + }, + { + "role": "tool", + "content": "70 degrees and sunny", + "tool_call_id": "call_15HrYApUn2NsS5kYqA4JPoIu" + } + ], + "model": "gpt-4o-mini" + } headers: accept: - application/json @@ -128,8 +229,8 @@ interactions: content-type: - application/json cookie: - - __cf_bm=9IFaLwbVtK7uOEFE2dslUkFDFTCFSZEUsU3yr6pZ_3I-1731074137-1.0.1.1-3uYq4aPispFdfxboed6vtN_eKem1xnkFZrlgg2PtlQbpidFIlCI11ZDKeF5k0OAI3Nh0sv_WoFbVqx22I2JsEQ; - _cfuvid=5bL_g45Wr1SP1uqQC1y2L.xbhNhBsaU4gvhrperwPYY-1731074137720-0.0.1.1-604800000 + - __cf_bm=1At99fRqY6hc0b7WD0Z6GqxBB8.HnHQdt.zc5aqbBGA-1731326468-1.0.1.1-k4wFZF25WUVRiv8euVZkQW59ZBfatyu853GVjcTFpREVg.Roj3x87yxAamv7PsQBLQGbhaVee09A5A_Ju4crSw; + _cfuvid=cIZnt0ZMVPq97LQaje8nMJbnYSddqmBc2KSSniffSJI-1731326468121-0.0.1.1-604800000 host: - api.openai.com user-agent: @@ -152,29 +253,52 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJkXLOI2fMtY8OJk08OqQ957oW12\",\n \"object\": - \"chat.completion\",\n \"created\": 1731074137,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Today, the weather in Seattle is 50 - degrees and raining, while in San Francisco, it's 70 degrees and sunny.\",\n - \ \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\": - \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 99,\n \"completion_tokens\": - 25,\n \"total_tokens\": 124,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0ba0d124f1\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNOOptAFRkDxUmOcawgASbDQhDxY", + "object": "chat.completion", + "created": 1731326468, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "Today in Seattle, it's 50 degrees and raining. In San Francisco, the weather is much nicer at 70 degrees and sunny.", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 99, + "completion_tokens": 27, + "total_tokens": 126, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df60fd12862e27a-MRS + - 8e0e203a2d46e1c0-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:55:38 GMT + - Mon, 11 Nov 2024 12:01:08 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -187,10 +311,10 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '859' + - '867' openai-organization: test_organization openai-processing-ms: - - '625' + - '542' openai-version: - '2020-10-01' strict-transport-security: @@ -208,7 +332,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_7f3194ba56f6e84bfbec244bc9e697c7 + - req_fd4ceb14593711cab87a48a11f238a08 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml index 6400ac8fd1..c853f22419 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml @@ -1,12 +1,42 @@ interactions: - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}], "model": "gpt-4o-mini", "tool_choice": "auto", "tools": [{"type": - "function", "function": {"name": "get_current_weather", "description": "Get - the current weather in a given location", "parameters": {"type": "object", "properties": - {"location": {"type": "string", "description": "The city and state, e.g. Boston, - MA"}}, "required": ["location"], "additionalProperties": false}}}]}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + } + ], + "model": "gpt-4o-mini", + "tool_choice": "auto", + "tools": [ + { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. Boston, MA" + } + }, + "required": [ + "location" + ], + "additionalProperties": false + } + } + } + ] + } headers: accept: - application/json @@ -40,35 +70,70 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJkUajohZiNR9Hzjp4jHsZeyLTXn\",\n \"object\": - \"chat.completion\",\n \"created\": 1731074134,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n - \ \"id\": \"call_gdXlzxsJq8bgV6vDy52d8r0N\",\n \"type\": - \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n - \ \"arguments\": \"{\\\"location\\\": \\\"Seattle, WA\\\"}\"\n - \ }\n },\n {\n \"id\": \"call_EZyypeD7zIcuVG0NisQ36VB7\",\n - \ \"type\": \"function\",\n \"function\": {\n \"name\": - \"get_current_weather\",\n \"arguments\": \"{\\\"location\\\": - \\\"San Francisco, CA\\\"}\"\n }\n }\n ],\n \"refusal\": - null\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 75,\n \"completion_tokens\": - 51,\n \"total_tokens\": 126,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0ba0d124f1\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNOKkq28LRJpIiRgmQ7UjNYnmddK", + "object": "chat.completion", + "created": 1731326464, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_yZyfurUiss6jyFfB7COuDKTq", + "type": "function", + "function": { + "name": "get_current_weather", + "arguments": "{\"location\": \"Seattle, WA\"}" + } + }, + { + "id": "call_Se9N4J0FifmT3Q3Bm1erfRJv", + "type": "function", + "function": { + "name": "get_current_weather", + "arguments": "{\"location\": \"San Francisco, CA\"}" + } + } + ], + "refusal": null + }, + "logprobs": null, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 75, + "completion_tokens": 51, + "total_tokens": 126, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "system_fingerprint": "fp_f59a81427f" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df60fbb4f0241f0-MRS + - 8e0e20239972e18b-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:55:35 GMT + - Mon, 11 Nov 2024 12:01:05 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -84,7 +149,7 @@ interactions: - '1308' openai-organization: test_organization openai-processing-ms: - - '1079' + - '1002' openai-version: - '2020-10-01' strict-transport-security: @@ -102,20 +167,56 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_9a5a4e89cc266daf5008b64ed5fbaf07 + - req_dcf2d53b7da813c1abd226e84b10cdf0 status: code: 200 message: OK - request: - body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."}, - {"role": "user", "content": "What''s the weather in Seattle and San Francisco - today?"}, {"role": "assistant", "tool_calls": [{"id": "call_gdXlzxsJq8bgV6vDy52d8r0N", - "function": {"arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather"}, - "type": "function"}, {"id": "call_EZyypeD7zIcuVG0NisQ36VB7", "function": {"arguments": - "{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather"}, "type": - "function"}]}, {"role": "tool", "content": "50 degrees and raining", "tool_call_id": - "call_gdXlzxsJq8bgV6vDy52d8r0N"}, {"role": "tool", "content": "70 degrees and - sunny", "tool_call_id": "call_EZyypeD7zIcuVG0NisQ36VB7"}], "model": "gpt-4o-mini"}' + body: |- + { + "messages": [ + { + "role": "system", + "content": "You're a helpful assistant." + }, + { + "role": "user", + "content": "What's the weather in Seattle and San Francisco today?" + }, + { + "role": "assistant", + "tool_calls": [ + { + "id": "call_yZyfurUiss6jyFfB7COuDKTq", + "function": { + "arguments": "{\"location\": \"Seattle, WA\"}", + "name": "get_current_weather" + }, + "type": "function" + }, + { + "id": "call_Se9N4J0FifmT3Q3Bm1erfRJv", + "function": { + "arguments": "{\"location\": \"San Francisco, CA\"}", + "name": "get_current_weather" + }, + "type": "function" + } + ] + }, + { + "role": "tool", + "content": "50 degrees and raining", + "tool_call_id": "call_yZyfurUiss6jyFfB7COuDKTq" + }, + { + "role": "tool", + "content": "70 degrees and sunny", + "tool_call_id": "call_Se9N4J0FifmT3Q3Bm1erfRJv" + } + ], + "model": "gpt-4o-mini" + } headers: accept: - application/json @@ -128,8 +229,8 @@ interactions: content-type: - application/json cookie: - - __cf_bm=uccQyWNZnSUT3NfE7TrDr_Qb0pJi0nCetLcHgpqvZF4-1731074135-1.0.1.1-4fj4Re6hs6myrY4O5hYugP5kze7SKj3Eko74XDuaa7v5m8Ox3IYtFrIA70lT3UfqeBWlyCtoP9iqxCgnaHDZQg; - _cfuvid=QOd1Lms.2nqAQl0cUyMCL.bGypkci3yI8gFdpnO9qp4-1731074135646-0.0.1.1-604800000 + - __cf_bm=lXXFq397kgLFsJWFRBmEEZto.3sHBvDC7w38zW26pxo-1731326465-1.0.1.1-rHEg1ncerPHXIR85T83jxOZ7_Y9vj3lv.VlJtq7Twuf1MyAtmBDSfDGUepIYGo.L0.23uhDVJBw1snK4Ai.usw; + _cfuvid=W5Ypti8iXPUVbb.ejDDCNvc4F1HDyCJzgR.m7qce61c-1731326465830-0.0.1.1-604800000 host: - api.openai.com user-agent: @@ -152,29 +253,52 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJkVEHUtbthDFKhPrCrM08EwO42n\",\n \"object\": - \"chat.completion\",\n \"created\": 1731074135,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Today, the weather in Seattle is 50 - degrees and raining, while in San Francisco, it is 70 degrees and sunny.\",\n - \ \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\": - \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 99,\n \"completion_tokens\": - 26,\n \"total_tokens\": 125,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0ba0d124f1\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNOMjzpI0LzTV6pXrpyLSKsGtOG4", + "object": "chat.completion", + "created": 1731326466, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "Today, the weather in Seattle is 50 degrees and raining, while in San Francisco, it's 70 degrees and sunny.", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 99, + "completion_tokens": 25, + "total_tokens": 124, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "system_fingerprint": "fp_f59a81427f" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df60fc439ad41f0-MRS + - 8e0e202be8e6e18b-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:55:36 GMT + - Mon, 11 Nov 2024 12:01:06 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -187,10 +311,10 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '860' + - '859' openai-organization: test_organization openai-processing-ms: - - '490' + - '620' openai-version: - '2020-10-01' strict-transport-security: @@ -208,7 +332,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_efe88734f57b290d25873df3c75aa3d1 + - req_06b116947a8f3e7fedc0135e5491779f status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml index 86cbfa5dbd..27e84585f7 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml @@ -1,7 +1,16 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "gpt-4o-mini", "stream": false}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "gpt-4o-mini", + "stream": false + } headers: accept: - application/json @@ -35,28 +44,52 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ARJChxt2fA6Qwd9jsTvVLvEQerDGZ\",\n \"object\": - \"chat.completion\",\n \"created\": 1731072039,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"This is a test.\",\n \"refusal\": - null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 12,\n \"completion_tokens\": - 5,\n \"total_tokens\": 17,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": - \"fp_0ba0d124f1\"\n}\n" + string: |- + { + "id": "chatcmpl-ASNOFSRkr4l6mtuu9wj9V77iVuJm5", + "object": "chat.completion", + "created": 1731326459, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "This is a test. How can I assist you further?", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12, + "completion_tokens": 12, + "total_tokens": 24, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8df5dc968fb4e1ac-MRS + - 8e0e1ffedc8ae28a-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 08 Nov 2024 13:20:40 GMT + - Mon, 11 Nov 2024 12:00:59 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -69,10 +102,10 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '765' + - '796' openai-organization: test_organization openai-processing-ms: - - '327' + - '344' openai-version: - '2020-10-01' strict-transport-security: @@ -90,7 +123,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_337e4834bfba3e14ca642a4ffd6d83b6 + - req_feaeab304d6203f932a69d236b443f67 status: code: 200 message: OK From b8b699ef70a0ea7fff5e791bb802df363f7fa3a6 Mon Sep 17 00:00:00 2001 From: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com> Date: Tue, 12 Nov 2024 00:12:26 +0800 Subject: [PATCH 16/20] opentelemetry-instrumentation-openai-v2: add codefromthecrypt and fix yaml fixture (#2989) --- .github/component_owners.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index cc08ec09cf..7483366029 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -75,3 +75,4 @@ components: - nirga - codefromthecrypt - alizenhom + - codefromthecrypt From 75ab53539ebf781333a9ecf215fe04939cd5d0f7 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Fri, 8 Nov 2024 14:30:33 +0200 Subject: [PATCH 17/20] add myself to component owners --- .github/component_owners.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index 7483366029..909c39325d 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -76,3 +76,4 @@ components: - codefromthecrypt - alizenhom - codefromthecrypt + - alizenhom From c5e25070c850c57fcfc2e6b045dd00c338053744 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Mon, 11 Nov 2024 18:23:48 +0200 Subject: [PATCH 18/20] component-owners --- .github/component_owners.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/component_owners.yml b/.github/component_owners.yml index 909c39325d..7483366029 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -76,4 +76,3 @@ components: - codefromthecrypt - alizenhom - codefromthecrypt - - alizenhom From cc5d604d01a02eb195448640ef04c044de609c79 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Wed, 13 Nov 2024 02:04:52 +0200 Subject: [PATCH 19/20] scrub leaked cookies --- .../test_async_chat_completion_404.yaml | 10 +- ...st_async_chat_completion_extra_params.yaml | 16 +- ...sync_chat_completion_multiple_choices.yaml | 26 +- ...completion_multiple_choices_streaming.yaml | 288 ++++++++++++------ ...n_multiple_tools_streaming_no_content.yaml | 48 +-- ...multiple_tools_streaming_with_content.yaml | 48 +-- .../test_async_chat_completion_streaming.yaml | 28 +- ...hat_completion_streaming_not_complete.yaml | 26 +- ...chat_completion_tool_calls_no_content.yaml | 55 ++-- ...at_completion_tool_calls_with_content.yaml | 57 ++-- ...st_async_chat_completion_with_content.yaml | 16 +- 11 files changed, 364 insertions(+), 254 deletions(-) diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml index 3eb8efc2ce..e055e68f20 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_404.yaml @@ -15,6 +15,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -56,13 +58,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e20160ec6e17f-MRS + - 8e1a80827a861852-MRS Connection: - keep-alive Content-Type: - application/json; charset=utf-8 Date: - - Mon, 11 Nov 2024 12:01:02 GMT + - Wed, 13 Nov 2024 00:04:01 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -74,13 +76,13 @@ interactions: - h3=":443"; ma=86400 content-length: - '231' - openai-organization: test_organization + openai-organization: test_openai_org_id strict-transport-security: - max-age=31536000; includeSubDomains; preload vary: - Origin x-request-id: - - req_93d359c0eeba1f2be7308d9132e82bf5 + - req_5cf06a7fabd45ebe21ee38c14c5b2f76 status: code: 404 message: Not Found diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml index 75989a29bc..3d13c9344e 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_extra_params.yaml @@ -20,6 +20,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -50,9 +52,9 @@ interactions: body: string: |- { - "id": "chatcmpl-ASNOJZk6WBJTYWmACy5zBiYnkvXAw", + "id": "chatcmpl-ASv9WMTAMZY4O1EImv3csZa6Ch7KI", "object": "chat.completion", - "created": 1731326463, + "created": 1731456242, "model": "gpt-4o-mini-2024-07-18", "choices": [ { @@ -88,13 +90,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e20191e7670e7-MRS + - 8e1a8088f867e167-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Mon, 11 Nov 2024 12:01:03 GMT + - Wed, 13 Nov 2024 00:04:02 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -108,9 +110,9 @@ interactions: - h3=":443"; ma=86400 content-length: - '825' - openai-organization: test_organization + openai-organization: test_openai_org_id openai-processing-ms: - - '483' + - '488' openai-version: - '2020-10-01' strict-transport-security: @@ -128,7 +130,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_bbcd55fb3044f058ea9f9ae8a388698d + - req_6df08d6267415e8f5db3628a6757edad status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml index e38e5c13f0..1404b8163a 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices.yaml @@ -17,6 +17,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -47,16 +49,16 @@ interactions: body: string: |- { - "id": "chatcmpl-ASNOJmzXWHqTArL7xMAtIJhIuu46p", + "id": "chatcmpl-ASv9XLlMmT7H3cf50dNTesHDBDwX5", "object": "chat.completion", - "created": 1731326463, + "created": 1731456243, "model": "gpt-4o-mini-2024-07-18", "choices": [ { "index": 0, "message": { "role": "assistant", - "content": "This is a test! How can I assist you further?", + "content": "This is a test.", "refusal": null }, "logprobs": null, @@ -66,7 +68,7 @@ interactions: "index": 1, "message": { "role": "assistant", - "content": "This is a test. How can I assist you further?", + "content": "This is a test.", "refusal": null }, "logprobs": null, @@ -75,8 +77,8 @@ interactions: ], "usage": { "prompt_tokens": 12, - "completion_tokens": 24, - "total_tokens": 36, + "completion_tokens": 10, + "total_tokens": 22, "prompt_tokens_details": { "cached_tokens": 0, "audio_tokens": 0 @@ -94,13 +96,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e201e3de30771-MRS + - 8e1a808f6d8e0d8b-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Mon, 11 Nov 2024 12:01:04 GMT + - Wed, 13 Nov 2024 00:04:04 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -113,10 +115,10 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '1030' - openai-organization: test_organization + - '970' + openai-organization: test_openai_org_id openai-processing-ms: - - '373' + - '306' openai-version: - '2020-10-01' strict-transport-security: @@ -134,7 +136,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_d1f29830c9ae2a48e896be67a1edcfd6 + - req_1317908e0f9b73276b57d4e171c533ea status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml index 162e6b0a54..4bca03a9e8 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_choices_streaming.yaml @@ -24,6 +24,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -53,195 +55,281 @@ interactions: response: body: string: |+ - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"I'm"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"I'm"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"I'm"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"I'm"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" unable"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" unable"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" unable"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" unable"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" provide"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" provide"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" provide"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" provide"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" real"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" real"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" real"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" real"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" updates"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" updates"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" like"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" updates"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" as"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" as"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" However"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" my"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" my"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" knowledge"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" conditions"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" knowledge"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" you"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" was"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" only"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" can"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" last"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" To"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" extends"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" easily"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" until"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" get"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" updated"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" check"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" October"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" October"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" most"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" accurate"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"202"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"202"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" up"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" San"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" I"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" using"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" I"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" don't"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" have"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-to"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" access"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"-date"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" don't"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" have"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" access"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" live"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" San"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" live"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" website"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" data"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" data"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" However"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" mobile"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" I"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" However"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" app"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" recommend"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" you"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" you"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" checking"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" can"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" If"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" can"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" easily"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" you"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" easily"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" reliable"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" check"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" need"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" check"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" historical"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" website"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" app"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" general"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" climate"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" patterns"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" San"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" these"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" San"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" cities"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" feel"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" by"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" free"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" using"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" visiting"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" ask"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOROCgV3LAjxPpkwpfTdn4QISZe","object":"chat.completion.chunk","created":1731326471,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":26,"completion_tokens":90,"total_tokens":116,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" website"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" website"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" using"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" mobile"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" app"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" app"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" most"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" If"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" accurate"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" you"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" need"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" up"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" historical"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" or"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" general"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" climate"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" data"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" those"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" cities"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" feel"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" free"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" ask"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-to"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"-date"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" information"},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + + data: {"id":"chatcmpl-ASv9hB9He94oQyZr1CDC8coqvmn5U","object":"chat.completion.chunk","created":1731456253,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":26,"completion_tokens":133,"total_tokens":159,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} data: [DONE] @@ -249,13 +337,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e204eeffee22f-MRS + - 8e1a80ceac3ce19a-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Mon, 11 Nov 2024 12:01:11 GMT + - Wed, 13 Nov 2024 00:04:13 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -267,9 +355,9 @@ interactions: - X-Request-ID alt-svc: - h3=":443"; ma=86400 - openai-organization: test_organization + openai-organization: test_openai_org_id openai-processing-ms: - - '221' + - '126' openai-version: - '2020-10-01' strict-transport-security: @@ -287,7 +375,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_57123afa9a5d1ae1abe38ebd3799be22 + - req_5dd8b6845db59fa55cf226eda1f5a2c6 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml index 44d4c526fb..19319de476 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_no_content.yaml @@ -46,6 +46,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -75,41 +77,41 @@ interactions: response: body: string: |+ - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_GuNfPyHYLpR7NxIAFU7YlEdw","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_hqkL24CLEwnniv4GDrjk14Iu","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, W"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, W"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_GIc62d1Svd9d2BW8WEVc3VJy","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_0s1enkFttXjIR7ozHoGMcnUu","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an F"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an F"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, C"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, C"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} - data: {"id":"chatcmpl-ASNOUyXaS81GnDOyjQHDOXA1t8rMs","object":"chat.completion.chunk","created":1731326474,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + data: {"id":"chatcmpl-ASv9l0RKJrq2fTx2dK5jhJoIr4rMI","object":"chat.completion.chunk","created":1731456257,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} data: [DONE] @@ -117,13 +119,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e20624d7fe280-MRS + - 8e1a80e4cfb00d86-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Mon, 11 Nov 2024 12:01:15 GMT + - Wed, 13 Nov 2024 00:04:19 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -135,9 +137,9 @@ interactions: - X-Request-ID alt-svc: - h3=":443"; ma=86400 - openai-organization: test_organization + openai-organization: test_openai_org_id openai-processing-ms: - - '1064' + - '1597' openai-version: - '2020-10-01' strict-transport-security: @@ -155,7 +157,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_7029e07196e4747502b310aa5b43a3b8 + - req_487aef2347cb4d1f97077c488dd93628 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml index d3ea956936..a026912ee1 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_multiple_tools_streaming_with_content.yaml @@ -46,6 +46,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -75,41 +77,41 @@ interactions: response: body: string: |+ - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_LIALtixlXYDOoaybI8QLNpU4","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_oJL2dc4GjWVxqBtWlGLwjbsR","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"eatt"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, W"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"le, W"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_DpuejD0bu1DeP4VTKxL2HpPC","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_ON3lp1OWsbw2obNRD43KVDp6","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"lo"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"catio"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"n\": \"S"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an F"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"an F"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"ranci"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, C"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"sco, C"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"A\"}"}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null} - data: {"id":"chatcmpl-ASNOTOzNrdXeXDDdhsk6I1oSscTrv","object":"chat.completion.chunk","created":1731326473,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + data: {"id":"chatcmpl-ASv9jfgm5JguNGaR9o9u94HpuhV7T","object":"chat.completion.chunk","created":1731456255,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":75,"completion_tokens":51,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} data: [DONE] @@ -117,13 +119,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e2058fe8c0d81-MRS + - 8e1a80d8efb9e1c8-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Mon, 11 Nov 2024 12:01:14 GMT + - Wed, 13 Nov 2024 00:04:16 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -135,9 +137,9 @@ interactions: - X-Request-ID alt-svc: - h3=":443"; ma=86400 - openai-organization: test_organization + openai-organization: test_openai_org_id openai-processing-ms: - - '1012' + - '1162' openai-version: - '2020-10-01' strict-transport-security: @@ -155,7 +157,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_65a1bd511c6ef6a75a9b7366f1317482 + - req_0b6729aef347cecd61ba3b7b7a8d4719 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml index 216ab48b55..efffcd7423 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming.yaml @@ -19,6 +19,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -48,21 +50,21 @@ interactions: response: body: string: |+ - data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9ejXDUtAhGOJJxWuw026zdinc4","object":"chat.completion.chunk","created":1731456250,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9ejXDUtAhGOJJxWuw026zdinc4","object":"chat.completion.chunk","created":1731456250,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9ejXDUtAhGOJJxWuw026zdinc4","object":"chat.completion.chunk","created":1731456250,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9ejXDUtAhGOJJxWuw026zdinc4","object":"chat.completion.chunk","created":1731456250,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9ejXDUtAhGOJJxWuw026zdinc4","object":"chat.completion.chunk","created":1731456250,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-ASv9ejXDUtAhGOJJxWuw026zdinc4","object":"chat.completion.chunk","created":1731456250,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + data: {"id":"chatcmpl-ASv9ejXDUtAhGOJJxWuw026zdinc4","object":"chat.completion.chunk","created":1731456250,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - data: {"id":"chatcmpl-ASNOPR96JvDZZ1gpQSlBSFizj0igZ","object":"chat.completion.chunk","created":1731326469,"model":"gpt-4-0613","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":12,"completion_tokens":5,"total_tokens":17,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} + data: {"id":"chatcmpl-ASv9ejXDUtAhGOJJxWuw026zdinc4","object":"chat.completion.chunk","created":1731456250,"model":"gpt-4-0613","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":12,"completion_tokens":5,"total_tokens":17,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}} data: [DONE] @@ -70,13 +72,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e20406aace20d-MRS + - 8e1a80bd2f31e1e5-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Mon, 11 Nov 2024 12:01:09 GMT + - Wed, 13 Nov 2024 00:04:11 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -88,9 +90,9 @@ interactions: - X-Request-ID alt-svc: - h3=":443"; ma=86400 - openai-organization: test_organization + openai-organization: test_openai_org_id openai-processing-ms: - - '245' + - '196' openai-version: - '2020-10-01' strict-transport-security: @@ -108,7 +110,7 @@ interactions: x-ratelimit-reset-tokens: - 1ms x-request-id: - - req_993220d84b3aa412d9df9f93837c50e0 + - req_cc9204ae23338b130df11c8c5b5f31af status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml index 0360d6a33b..9ef5613d17 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_streaming_not_complete.yaml @@ -16,6 +16,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -45,19 +47,19 @@ interactions: response: body: string: |+ - data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9gROIIAvRs9QnmLP8Nzs3PGMCX","object":"chat.completion.chunk","created":1731456252,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9gROIIAvRs9QnmLP8Nzs3PGMCX","object":"chat.completion.chunk","created":1731456252,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9gROIIAvRs9QnmLP8Nzs3PGMCX","object":"chat.completion.chunk","created":1731456252,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9gROIIAvRs9QnmLP8Nzs3PGMCX","object":"chat.completion.chunk","created":1731456252,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9gROIIAvRs9QnmLP8Nzs3PGMCX","object":"chat.completion.chunk","created":1731456252,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-ASv9gROIIAvRs9QnmLP8Nzs3PGMCX","object":"chat.completion.chunk","created":1731456252,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-ASNOQfxiiRIJgZXLhRSeBf1m5OAJ7","object":"chat.completion.chunk","created":1731326470,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + data: {"id":"chatcmpl-ASv9gROIIAvRs9QnmLP8Nzs3PGMCX","object":"chat.completion.chunk","created":1731456252,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} data: [DONE] @@ -65,13 +67,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e2048ef0470f2-MRS + - 8e1a80c54d00e288-MRS Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Mon, 11 Nov 2024 12:01:11 GMT + - Wed, 13 Nov 2024 00:04:12 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -83,9 +85,9 @@ interactions: - X-Request-ID alt-svc: - h3=":443"; ma=86400 - openai-organization: test_organization + openai-organization: test_openai_org_id openai-processing-ms: - - '285' + - '283' openai-version: - '2020-10-01' strict-transport-security: @@ -103,7 +105,7 @@ interactions: x-ratelimit-reset-tokens: - 1ms x-request-id: - - req_ba80443b4e602a536744861d19540ef0 + - req_e9e4ea6fd060391e8cc8cfea78ad9a15 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml index 77ffea5754..053e271d45 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_no_content.yaml @@ -42,6 +42,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -72,9 +74,9 @@ interactions: body: string: |- { - "id": "chatcmpl-ASNONBA9uswbK7owOLA7k5HTTgOse", + "id": "chatcmpl-ASv9bJqWatpvCC0YMsYRcTSIiXoxk", "object": "chat.completion", - "created": 1731326467, + "created": 1731456247, "model": "gpt-4o-mini-2024-07-18", "choices": [ { @@ -84,7 +86,7 @@ interactions: "content": null, "tool_calls": [ { - "id": "call_REDH25T3s3BBdVf8V2uV60Id", + "id": "call_vwOezSsB5j9ei1SSMlZjqx7g", "type": "function", "function": { "name": "get_current_weather", @@ -92,7 +94,7 @@ interactions: } }, { - "id": "call_15HrYApUn2NsS5kYqA4JPoIu", + "id": "call_LzeIYcKhHnVF60u4LmBpT1tv", "type": "function", "function": { "name": "get_current_weather", @@ -127,13 +129,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e2032b88ee1c0-MRS + - 8e1a80a9f8fbe1c9-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Mon, 11 Nov 2024 12:01:08 GMT + - Wed, 13 Nov 2024 00:04:08 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -147,9 +149,9 @@ interactions: - h3=":443"; ma=86400 content-length: - '1308' - openai-organization: test_organization + openai-organization: test_openai_org_id openai-processing-ms: - - '879' + - '808' openai-version: - '2020-10-01' strict-transport-security: @@ -167,7 +169,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_8911f9733855181d5f9f10c22ef3ee0b + - req_f1b9b75e4a73b542c9b1b992cd52c66f status: code: 200 message: OK @@ -187,7 +189,7 @@ interactions: "role": "assistant", "tool_calls": [ { - "id": "call_REDH25T3s3BBdVf8V2uV60Id", + "id": "call_vwOezSsB5j9ei1SSMlZjqx7g", "function": { "arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather" @@ -195,7 +197,7 @@ interactions: "type": "function" }, { - "id": "call_15HrYApUn2NsS5kYqA4JPoIu", + "id": "call_LzeIYcKhHnVF60u4LmBpT1tv", "function": { "arguments": "{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather" @@ -207,12 +209,12 @@ interactions: { "role": "tool", "content": "50 degrees and raining", - "tool_call_id": "call_REDH25T3s3BBdVf8V2uV60Id" + "tool_call_id": "call_vwOezSsB5j9ei1SSMlZjqx7g" }, { "role": "tool", "content": "70 degrees and sunny", - "tool_call_id": "call_15HrYApUn2NsS5kYqA4JPoIu" + "tool_call_id": "call_LzeIYcKhHnVF60u4LmBpT1tv" } ], "model": "gpt-4o-mini" @@ -222,6 +224,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -229,8 +233,7 @@ interactions: content-type: - application/json cookie: - - __cf_bm=1At99fRqY6hc0b7WD0Z6GqxBB8.HnHQdt.zc5aqbBGA-1731326468-1.0.1.1-k4wFZF25WUVRiv8euVZkQW59ZBfatyu853GVjcTFpREVg.Roj3x87yxAamv7PsQBLQGbhaVee09A5A_Ju4crSw; - _cfuvid=cIZnt0ZMVPq97LQaje8nMJbnYSddqmBc2KSSniffSJI-1731326468121-0.0.1.1-604800000 + - test_cookie host: - api.openai.com user-agent: @@ -255,16 +258,16 @@ interactions: body: string: |- { - "id": "chatcmpl-ASNOOptAFRkDxUmOcawgASbDQhDxY", + "id": "chatcmpl-ASv9dfXfIwGCZgeWzDTbCh0FuU9kh", "object": "chat.completion", - "created": 1731326468, + "created": 1731456249, "model": "gpt-4o-mini-2024-07-18", "choices": [ { "index": 0, "message": { "role": "assistant", - "content": "Today in Seattle, it's 50 degrees and raining. In San Francisco, the weather is much nicer at 70 degrees and sunny.", + "content": "Today, the weather in Seattle is 50 degrees and raining, while in San Francisco, it's 70 degrees and sunny.", "refusal": null }, "logprobs": null, @@ -273,8 +276,8 @@ interactions: ], "usage": { "prompt_tokens": 99, - "completion_tokens": 27, - "total_tokens": 126, + "completion_tokens": 25, + "total_tokens": 124, "prompt_tokens_details": { "cached_tokens": 0, "audio_tokens": 0 @@ -292,13 +295,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e203a2d46e1c0-MRS + - 8e1a80b3baade1c9-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Mon, 11 Nov 2024 12:01:08 GMT + - Wed, 13 Nov 2024 00:04:10 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -311,10 +314,10 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '867' - openai-organization: test_organization + - '859' + openai-organization: test_openai_org_id openai-processing-ms: - - '542' + - '972' openai-version: - '2020-10-01' strict-transport-security: @@ -332,7 +335,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_fd4ceb14593711cab87a48a11f238a08 + - req_754e6b59f1d3da727e2210e3d8c56243 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml index c853f22419..ebebb20603 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_tool_calls_with_content.yaml @@ -42,6 +42,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -72,9 +74,9 @@ interactions: body: string: |- { - "id": "chatcmpl-ASNOKkq28LRJpIiRgmQ7UjNYnmddK", + "id": "chatcmpl-ASv9ZqgNAOJAOLYMgdmxouatKXJlk", "object": "chat.completion", - "created": 1731326464, + "created": 1731456245, "model": "gpt-4o-mini-2024-07-18", "choices": [ { @@ -84,7 +86,7 @@ interactions: "content": null, "tool_calls": [ { - "id": "call_yZyfurUiss6jyFfB7COuDKTq", + "id": "call_O8NOz8VlxosSASEsOY7LDUcP", "type": "function", "function": { "name": "get_current_weather", @@ -92,7 +94,7 @@ interactions: } }, { - "id": "call_Se9N4J0FifmT3Q3Bm1erfRJv", + "id": "call_3m7cyuckijnpiWr6tq0Tl8Mg", "type": "function", "function": { "name": "get_current_weather", @@ -121,19 +123,19 @@ interactions: "rejected_prediction_tokens": 0 } }, - "system_fingerprint": "fp_f59a81427f" + "system_fingerprint": "fp_0ba0d124f1" } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e20239972e18b-MRS + - 8e1a8098ac5ae167-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Mon, 11 Nov 2024 12:01:05 GMT + - Wed, 13 Nov 2024 00:04:06 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -147,9 +149,9 @@ interactions: - h3=":443"; ma=86400 content-length: - '1308' - openai-organization: test_organization + openai-organization: test_openai_org_id openai-processing-ms: - - '1002' + - '937' openai-version: - '2020-10-01' strict-transport-security: @@ -167,7 +169,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_dcf2d53b7da813c1abd226e84b10cdf0 + - req_3cd7152d2c8c10b4f354b27165f6c2b5 status: code: 200 message: OK @@ -187,7 +189,7 @@ interactions: "role": "assistant", "tool_calls": [ { - "id": "call_yZyfurUiss6jyFfB7COuDKTq", + "id": "call_O8NOz8VlxosSASEsOY7LDUcP", "function": { "arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather" @@ -195,7 +197,7 @@ interactions: "type": "function" }, { - "id": "call_Se9N4J0FifmT3Q3Bm1erfRJv", + "id": "call_3m7cyuckijnpiWr6tq0Tl8Mg", "function": { "arguments": "{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather" @@ -207,12 +209,12 @@ interactions: { "role": "tool", "content": "50 degrees and raining", - "tool_call_id": "call_yZyfurUiss6jyFfB7COuDKTq" + "tool_call_id": "call_O8NOz8VlxosSASEsOY7LDUcP" }, { "role": "tool", "content": "70 degrees and sunny", - "tool_call_id": "call_Se9N4J0FifmT3Q3Bm1erfRJv" + "tool_call_id": "call_3m7cyuckijnpiWr6tq0Tl8Mg" } ], "model": "gpt-4o-mini" @@ -222,6 +224,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -229,8 +233,7 @@ interactions: content-type: - application/json cookie: - - __cf_bm=lXXFq397kgLFsJWFRBmEEZto.3sHBvDC7w38zW26pxo-1731326465-1.0.1.1-rHEg1ncerPHXIR85T83jxOZ7_Y9vj3lv.VlJtq7Twuf1MyAtmBDSfDGUepIYGo.L0.23uhDVJBw1snK4Ai.usw; - _cfuvid=W5Ypti8iXPUVbb.ejDDCNvc4F1HDyCJzgR.m7qce61c-1731326465830-0.0.1.1-604800000 + - test_cookie host: - api.openai.com user-agent: @@ -255,16 +258,16 @@ interactions: body: string: |- { - "id": "chatcmpl-ASNOMjzpI0LzTV6pXrpyLSKsGtOG4", + "id": "chatcmpl-ASv9aQnGndy04lqKoPRagym1eEaQK", "object": "chat.completion", - "created": 1731326466, + "created": 1731456246, "model": "gpt-4o-mini-2024-07-18", "choices": [ { "index": 0, "message": { "role": "assistant", - "content": "Today, the weather in Seattle is 50 degrees and raining, while in San Francisco, it's 70 degrees and sunny.", + "content": "Today, Seattle is experiencing 50 degrees and raining, while San Francisco has a pleasant 70 degrees and sunny weather.", "refusal": null }, "logprobs": null, @@ -273,8 +276,8 @@ interactions: ], "usage": { "prompt_tokens": 99, - "completion_tokens": 25, - "total_tokens": 124, + "completion_tokens": 24, + "total_tokens": 123, "prompt_tokens_details": { "cached_tokens": 0, "audio_tokens": 0 @@ -292,13 +295,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e202be8e6e18b-MRS + - 8e1a80a39c71e167-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Mon, 11 Nov 2024 12:01:06 GMT + - Wed, 13 Nov 2024 00:04:07 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -311,10 +314,10 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '859' - openai-organization: test_organization + - '871' + openai-organization: test_openai_org_id openai-processing-ms: - - '620' + - '477' openai-version: - '2020-10-01' strict-transport-security: @@ -332,7 +335,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_06b116947a8f3e7fedc0135e5491779f + - req_193c74758ea30e77e55afe931e89fd6c status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml index 27e84585f7..61ec4a646e 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_async_chat_completion_with_content.yaml @@ -16,6 +16,8 @@ interactions: - application/json accept-encoding: - gzip, deflate + authorization: + - Bearer test_openai_api_key connection: - keep-alive content-length: @@ -46,9 +48,9 @@ interactions: body: string: |- { - "id": "chatcmpl-ASNOFSRkr4l6mtuu9wj9V77iVuJm5", + "id": "chatcmpl-ASv9R2E7Yhb2e7bj4Xl0qm9s3J42Y", "object": "chat.completion", - "created": 1731326459, + "created": 1731456237, "model": "gpt-4o-mini-2024-07-18", "choices": [ { @@ -83,13 +85,13 @@ interactions: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8e0e1ffedc8ae28a-MRS + - 8e1a80679a8311a6-MRS Connection: - keep-alive Content-Type: - application/json Date: - - Mon, 11 Nov 2024 12:00:59 GMT + - Wed, 13 Nov 2024 00:03:58 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -103,9 +105,9 @@ interactions: - h3=":443"; ma=86400 content-length: - '796' - openai-organization: test_organization + openai-organization: test_openai_org_id openai-processing-ms: - - '344' + - '359' openai-version: - '2020-10-01' strict-transport-security: @@ -123,7 +125,7 @@ interactions: x-ratelimit-reset-tokens: - 0s x-request-id: - - req_feaeab304d6203f932a69d236b443f67 + - req_41ea134c1fc450d4ca4cf8d0c6a7c53a status: code: 200 message: OK From abdc9b66680c5e3ae36b04a30dbd26ad1ce79854 Mon Sep 17 00:00:00 2001 From: Ali Waleed Date: Thu, 14 Nov 2024 15:29:13 +0200 Subject: [PATCH 20/20] Adjust changelog format --- .../opentelemetry-instrumentation-openai-v2/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md index 7dd3b58558..07b10615c1 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -- Support for `AsyncOpenAI/AsyncCompletions` +- Support for `AsyncOpenAI/AsyncCompletions` ([#2984](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2984)) ## Version 2.0b0 (2024-11-08)