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 1b7a7988ca..ae00c6ef70 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 @@ -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 @@ -16,41 +24,45 @@ interactions: host: - api.openai.com user-agent: - - OpenAI/Python 1.52.2 + - OpenAI/Python 1.26.0 x-stainless-arch: - - other:amd64 + - arm64 x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - Windows + - MacOS x-stainless-package-version: - - 1.52.2 - x-stainless-retry-count: - - '2' + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.7 + - 3.12.6 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" + 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: - - 8d88b04c2c5db9eb-SEA + - 8dd0709dffd19c8c-SIN Connection: - keep-alive Content-Type: - application/json; charset=utf-8 Date: - - Sat, 26 Oct 2024 07:21:17 GMT + - Mon, 04 Nov 2024 00:20:44 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -68,7 +80,7 @@ interactions: vary: - Origin x-request-id: - - req_8529656422f0360e8bcba8c2b8fe34e9 + - req_e08854c4f7d5104af6fdc755caed30fc status: code: 404 message: Not Found diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml index 75903a6a55..cfcd27074a 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_extra_params.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_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, "service_tier": "auto", "stream": - false, "temperature": 0.5}' + 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 @@ -11,54 +23,74 @@ interactions: connection: - keep-alive content-length: - - '180' + - '183' content-type: - application/json host: - api.openai.com user-agent: - - OpenAI/Python 1.52.2 + - OpenAI/Python 1.26.0 x-stainless-arch: - - other:amd64 + - arm64 x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - Windows + - MacOS x-stainless-package-version: - - 1.52.2 - x-stainless-retry-count: - - '0' + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.7 + - 3.12.6 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-AMTlCEj20ZcsgWKZt8EizFMDItWNf\",\n \"object\": - \"chat.completion\",\n \"created\": 1729920978,\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 },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n - \ \"system_fingerprint\": \"fp_f59a81427f\"\n}\n" + string: |- + { + "id": "chatcmpl-APfFNvBVQx43PNOIf1dWnEUT5u5fA", + "object": "chat.completion", + "created": 1730680117, + "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 + }, + "completion_tokens_details": { + "reasoning_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8d881682197c7571-SEA + - 8dd07c2d0a5a9f98-SIN Connection: - keep-alive Content-Type: - application/json Date: - - Sat, 26 Oct 2024 05:36:18 GMT + - Mon, 04 Nov 2024 00:28:37 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -74,25 +106,25 @@ interactions: - '697' openai-organization: test_organization openai-processing-ms: - - '275' + - '228' openai-version: - '2020-10-01' strict-transport-security: - max-age=31536000; includeSubDomains; preload x-ratelimit-limit-requests: - - '200' + - '10000' x-ratelimit-limit-tokens: - - '60000' + - '200000' x-ratelimit-remaining-requests: - - '195' + - '9998' x-ratelimit-remaining-tokens: - - '59944' + - '199943' x-ratelimit-reset-requests: - - 32m17.492s + - 13.724s x-ratelimit-reset-tokens: - - 56ms + - 16ms x-request-id: - - req_181075e8f861d6685fe1ae5d4bfc9b25 + - req_0ded46a4535c24c36ef58363b7538421 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml index 2416a06cb8..9518e41225 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_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 @@ -16,50 +26,77 @@ interactions: host: - api.openai.com user-agent: - - OpenAI/Python 1.52.2 + - OpenAI/Python 1.26.0 x-stainless-arch: - - other:amd64 + - arm64 x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - Windows + - MacOS x-stainless-package-version: - - 1.52.2 - x-stainless-retry-count: - - '0' + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.7 + - 3.12.6 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-AMT4dWD9gi2PyDcXBK10harskeREO\",\n \"object\": - \"chat.completion\",\n \"created\": 1729918339,\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 },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"fp_f59a81427f\"\n}\n" + string: |- + { + "id": "chatcmpl-APfFO3w0cNVOphe5Lk9EaYyRaS2pm", + "object": "chat.completion", + "created": 1730680118, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "This is a test.", + "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": 17, + "total_tokens": 29, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8d87d6120a899357-SEA + - 8dd07c30beda3dd4-SIN Connection: - keep-alive Content-Type: - application/json Date: - - Sat, 26 Oct 2024 04:52:19 GMT + - Mon, 04 Nov 2024 00:28:38 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -75,25 +112,25 @@ interactions: - '872' openai-organization: test_organization openai-processing-ms: - - '664' + - '261' openai-version: - '2020-10-01' strict-transport-security: - max-age=31536000; includeSubDomains; preload x-ratelimit-limit-requests: - - '200' + - '10000' x-ratelimit-limit-tokens: - - '60000' + - '200000' x-ratelimit-remaining-requests: - - '199' + - '9997' x-ratelimit-remaining-tokens: - - '59962' + - '199962' x-ratelimit-reset-requests: - - 7m12s + - 21.785s x-ratelimit-reset-tokens: - - 38ms + - 11ms x-request-id: - - req_d8b7a2507994f22fe0d4511c7e0a3bdc + - req_86ab6a7a85f95e2a001cfeb89e0827b1 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml index c5be0fa9d4..e587ce5a38 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_choices_streaming.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_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 @@ -18,441 +33,271 @@ interactions: host: - api.openai.com user-agent: - - OpenAI/Python 1.52.2 + - OpenAI/Python 1.26.0 x-stainless-arch: - - other:amd64 + - arm64 x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - Windows + - MacOS x-stainless-package-version: - - 1.52.2 - x-stainless-retry-count: - - '0' + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.7 + - 3.12.6 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + string: |+ + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":"I''m"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":"I''m"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - unable"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - sorry"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - to"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - provide"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - but"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - real"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - I"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - can''t"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - provide"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - updates"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - real"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":"-time"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - However"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" please"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - updates"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" by"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - you"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - as"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - can"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - my"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - easily"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - training"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - check"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - data"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" also"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" use"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - goes"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" Channel"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - current"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" search"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - up"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" Acc"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" engine"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"u"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - in"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - to"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" service"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - October"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" immediate"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - "},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - and"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" local"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" news"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - San"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" station"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" on"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":"'s"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":"202"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - and"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - using"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" there's"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":"'s"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - I"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" anything"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" else"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" you'd"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - websites"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":1,"delta":{"content":" today"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - like"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[{"index":0,"delta":{"content":" know"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - don''t"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - have"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - access"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - to"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - Weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - live"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - Channel"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - data"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - Acc"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":"u"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":"Weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - I"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - recommend"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - checking"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - reliable"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - website"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - or"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - using"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - or"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - app"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - on"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - your"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":" - smartphone"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - app"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - for"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - most"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - current"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - information"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - on"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - weather"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - in"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - Seattle"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - and"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - San"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":" - Francisco"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[{"index":1,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - - - data: {"id":"chatcmpl-AMUBWEnUmLx8XIYS8oNiZopa2WpJf","object":"chat.completion.chunk","created":1729922610,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","choices":[],"usage":{"prompt_tokens":26,"completion_tokens":100,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":0},"completion_tokens_details":{"reasoning_tokens":0}}} + data: {"id":"chatcmpl-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"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-APfFT3JSFkuTVECTo0DfULAD8vftU","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","choices":[],"usage":{"prompt_tokens":26,"completion_tokens":111,"total_tokens":137,"prompt_tokens_details":{"cached_tokens":0},"completion_tokens_details":{"reasoning_tokens":0}}} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8d883e57eb7227f9-SEA + - 8dd07c55783bce06-SIN Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Sat, 26 Oct 2024 06:03:30 GMT + - Mon, 04 Nov 2024 00:28:44 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -466,25 +311,25 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '216' + - '127' openai-version: - '2020-10-01' strict-transport-security: - max-age=31536000; includeSubDomains; preload x-ratelimit-limit-requests: - - '200' + - '10000' x-ratelimit-limit-tokens: - - '60000' + - '200000' x-ratelimit-remaining-requests: - - '194' + - '9993' x-ratelimit-remaining-tokens: - - '59945' + - '199945' x-ratelimit-reset-requests: - - 41m5.83s + - 59.105s x-ratelimit-reset-tokens: - - 55ms + - 16ms x-request-id: - - req_2cafe46d3edfcc0f61e4885c27cca46e + - req_4d50387aa59e08f2dc486aa5c62613f5 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml index 86085d12cf..8989eb9cfa 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_no_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_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", "parallel_tool_calls": true, "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 @@ -16,107 +49,81 @@ interactions: connection: - keep-alive content-length: - - '631' + - '602' content-type: - application/json host: - api.openai.com user-agent: - - OpenAI/Python 1.52.2 + - OpenAI/Python 1.26.0 x-stainless-arch: - - other:amd64 + - arm64 x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - Windows + - MacOS x-stainless-package-version: - - 1.52.2 - x-stainless-retry-count: - - '0' + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.7 + - 3.12.6 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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}]} + string: |+ + data: {"id":"chatcmpl-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_H7ADtKo1DKIzNyrCSBt1jKdw","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_yy3bBunEUS0C3HGZECG9EGCj","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_Dmv04Iin9mOpBKWSwdb5DbpS","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_ug3IE7qMdaP4tBJwJHacc7GO","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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},"completion_tokens_details":{"reasoning_tokens":0}}} + data: {"id":"chatcmpl-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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-APfFYyp9joT2Wwh01iYvcm6iDYtV3","object":"chat.completion.chunk","created":1730680128,"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},"completion_tokens_details":{"reasoning_tokens":0}}} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8d887ec3b9047639-SEA + - 8dd07c715fd66beb-SIN Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Sat, 26 Oct 2024 06:47:29 GMT + - Mon, 04 Nov 2024 00:28:49 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -130,25 +137,25 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '723' + - '647' openai-version: - '2020-10-01' strict-transport-security: - max-age=31536000; includeSubDomains; preload x-ratelimit-limit-requests: - - '200' + - '10000' x-ratelimit-limit-tokens: - - '60000' + - '200000' x-ratelimit-remaining-requests: - - '197' + - '9991' x-ratelimit-remaining-tokens: - - '59961' + - '199961' x-ratelimit-reset-requests: - - 18m43.156s + - 1m11.934s x-ratelimit-reset-tokens: - - 39ms + - 11ms x-request-id: - - req_81b3cd6dbe38ffddcdca90c699f71f84 + - req_66ecdeba3a9e89bbc2aa60243fb1fdfb status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml index 86085d12cf..c39facccc5 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_multiple_tools_streaming_with_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_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", "parallel_tool_calls": true, "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 @@ -16,107 +49,81 @@ interactions: connection: - keep-alive content-length: - - '631' + - '602' content-type: - application/json host: - api.openai.com user-agent: - - OpenAI/Python 1.52.2 + - OpenAI/Python 1.26.0 x-stainless-arch: - - other:amd64 + - arm64 x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - Windows + - MacOS x-stainless-package-version: - - 1.52.2 - x-stainless-retry-count: - - '0' + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.7 + - 3.12.6 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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}]} + string: |+ + data: {"id":"chatcmpl-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_CqwFQqzbiNttzDzEXiUitRos","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_yy3bBunEUS0C3HGZECG9EGCj","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_0ba0d124f1","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_SGVgEhhsqfE7s6MOHSXwKSGG","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_f59a81427f","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_ug3IE7qMdaP4tBJwJHacc7GO","type":"function","function":{"name":"get_current_weather","arguments":""}}]},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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-AMUs4TXmQG6Rbn1KXpwESVDmy6eoL","object":"chat.completion.chunk","created":1729925248,"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},"completion_tokens_details":{"reasoning_tokens":0}}} + data: {"id":"chatcmpl-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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-APfFVrgZUKVR18p3BuIQN3OYWjFIM","object":"chat.completion.chunk","created":1730680125,"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},"completion_tokens_details":{"reasoning_tokens":0}}} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8d887ec3b9047639-SEA + - 8dd07c5d48f0ce22-SIN Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Sat, 26 Oct 2024 06:47:29 GMT + - Mon, 04 Nov 2024 00:28:48 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -130,25 +137,25 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '723' + - '2886' openai-version: - '2020-10-01' strict-transport-security: - max-age=31536000; includeSubDomains; preload x-ratelimit-limit-requests: - - '200' + - '10000' x-ratelimit-limit-tokens: - - '60000' + - '200000' x-ratelimit-remaining-requests: - - '197' + - '9992' x-ratelimit-remaining-tokens: - - '59961' + - '199961' x-ratelimit-reset-requests: - - 18m43.156s + - 1m6.499s x-ratelimit-reset-tokens: - - 39ms + - 11ms x-request-id: - - req_81b3cd6dbe38ffddcdca90c699f71f84 + - req_c887b8540fec8e4eadca5d56c78cc4e1 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml index c61133739b..713ea762e0 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_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 @@ -16,7 +28,7 @@ interactions: host: - api.openai.com user-agent: - - OpenAI/Python 1.47.0 + - OpenAI/Python 1.26.0 x-stainless-arch: - arm64 x-stainless-async: @@ -26,57 +38,45 @@ interactions: x-stainless-os: - MacOS x-stainless-package-version: - - 1.47.0 + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.11.5 + - 3.12.6 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-AC6akONKCxc8HS63qZ08HyjeTSq6p","object":"chat.completion.chunk","created":1727448638,"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-APfFSQXvyhxafsCMim55E7utaYINv","object":"chat.completion.chunk","created":1730680122,"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-APfFSQXvyhxafsCMim55E7utaYINv","object":"chat.completion.chunk","created":1730680122,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-AC6akONKCxc8HS63qZ08HyjeTSq6p","object":"chat.completion.chunk","created":1727448638,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFSQXvyhxafsCMim55E7utaYINv","object":"chat.completion.chunk","created":1730680122,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFSQXvyhxafsCMim55E7utaYINv","object":"chat.completion.chunk","created":1730680122,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-AC6akONKCxc8HS63qZ08HyjeTSq6p","object":"chat.completion.chunk","created":1727448638,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - is"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFSQXvyhxafsCMim55E7utaYINv","object":"chat.completion.chunk","created":1730680122,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFSQXvyhxafsCMim55E7utaYINv","object":"chat.completion.chunk","created":1730680122,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - data: {"id":"chatcmpl-AC6akONKCxc8HS63qZ08HyjeTSq6p","object":"chat.completion.chunk","created":1727448638,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AC6akONKCxc8HS63qZ08HyjeTSq6p","object":"chat.completion.chunk","created":1727448638,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - test"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AC6akONKCxc8HS63qZ08HyjeTSq6p","object":"chat.completion.chunk","created":1727448638,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AC6akONKCxc8HS63qZ08HyjeTSq6p","object":"chat.completion.chunk","created":1727448638,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - - - data: {"id":"chatcmpl-AC6akONKCxc8HS63qZ08HyjeTSq6p","object":"chat.completion.chunk","created":1727448638,"model":"gpt-4-0613","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":12,"completion_tokens":5,"total_tokens":17,"completion_tokens_details":{"reasoning_tokens":0}}} + data: {"id":"chatcmpl-APfFSQXvyhxafsCMim55E7utaYINv","object":"chat.completion.chunk","created":1730680122,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} + data: {"id":"chatcmpl-APfFSQXvyhxafsCMim55E7utaYINv","object":"chat.completion.chunk","created":1730680122,"model":"gpt-4-0613","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":12,"completion_tokens":5,"total_tokens":17,"prompt_tokens_details":{"cached_tokens":0},"completion_tokens_details":{"reasoning_tokens":0}}} data: [DONE] - - ' headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8c9c4ea489d57948-PMO + - 8dd07c4b99b74927-SIN Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Fri, 27 Sep 2024 14:50:38 GMT + - Mon, 04 Nov 2024 00:28:42 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -86,9 +86,11 @@ interactions: - nosniff access-control-expose-headers: - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '161' + - '157' openai-version: - '2020-10-01' strict-transport-security: @@ -96,17 +98,17 @@ interactions: x-ratelimit-limit-requests: - '10000' x-ratelimit-limit-tokens: - - '1000000' + - '10000' x-ratelimit-remaining-requests: - '9999' x-ratelimit-remaining-tokens: - - '999977' + - '9978' x-ratelimit-reset-requests: - - 6ms + - 8.64s x-ratelimit-reset-tokens: - - 1ms + - 132ms x-request-id: - - req_3fa9ac9f3693c712e4c377e26d203e58 + - req_72de20dac77a9535e3f47a6ec3a39ddc status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml index ea683057c3..bec0658770 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_streaming_not_complete.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_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, "stream_options": {"include_usage": true}}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "gpt-4", + "stream": true + } headers: accept: - application/json @@ -10,75 +19,59 @@ interactions: connection: - keep-alive content-length: - - '142' + - '99' content-type: - application/json host: - api.openai.com user-agent: - - OpenAI/Python 1.52.2 + - OpenAI/Python 1.26.0 x-stainless-arch: - - other:amd64 + - arm64 x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - Windows + - MacOS x-stainless-package-version: - - 1.52.2 - x-stainless-retry-count: - - '0' + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.7 + - 3.12.6 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-AMVXI9sDOpHDCsGW99OJ6fYqHSu0J","object":"chat.completion.chunk","created":1729927804,"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-APfFTxI7bvaTTeQd32CHwpV6GKo7x","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-APfFTxI7bvaTTeQd32CHwpV6GKo7x","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-AMVXI9sDOpHDCsGW99OJ6fYqHSu0J","object":"chat.completion.chunk","created":1729927804,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFTxI7bvaTTeQd32CHwpV6GKo7x","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-APfFTxI7bvaTTeQd32CHwpV6GKo7x","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-AMVXI9sDOpHDCsGW99OJ6fYqHSu0J","object":"chat.completion.chunk","created":1729927804,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - is"},"logprobs":null,"finish_reason":null}],"usage":null} + data: {"id":"chatcmpl-APfFTxI7bvaTTeQd32CHwpV6GKo7x","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}]} + data: {"id":"chatcmpl-APfFTxI7bvaTTeQd32CHwpV6GKo7x","object":"chat.completion.chunk","created":1730680123,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - data: {"id":"chatcmpl-AMVXI9sDOpHDCsGW99OJ6fYqHSu0J","object":"chat.completion.chunk","created":1729927804,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMVXI9sDOpHDCsGW99OJ6fYqHSu0J","object":"chat.completion.chunk","created":1729927804,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - test"},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMVXI9sDOpHDCsGW99OJ6fYqHSu0J","object":"chat.completion.chunk","created":1729927804,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null} - - - data: {"id":"chatcmpl-AMVXI9sDOpHDCsGW99OJ6fYqHSu0J","object":"chat.completion.chunk","created":1729927804,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null} - - - data: {"id":"chatcmpl-AMVXI9sDOpHDCsGW99OJ6fYqHSu0J","object":"chat.completion.chunk","created":1729927804,"model":"gpt-4-0613","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":12,"completion_tokens":5,"total_tokens":17,"prompt_tokens_details":{"cached_tokens":0},"completion_tokens_details":{"reasoning_tokens":0}}} - + data: {"id":"chatcmpl-APfFTxI7bvaTTeQd32CHwpV6GKo7x","object":"chat.completion.chunk","created":1730680123,"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: - - 8d88bd2c0d9e308c-SEA + - 8dd07c505e24cdf2-SIN Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Sat, 26 Oct 2024 07:30:05 GMT + - Mon, 04 Nov 2024 00:28:43 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -92,25 +85,25 @@ interactions: - h3=":443"; ma=86400 openai-organization: test_organization openai-processing-ms: - - '176' + - '269' openai-version: - '2020-10-01' strict-transport-security: - max-age=31536000; includeSubDomains; preload x-ratelimit-limit-requests: - - '200' + - '10000' x-ratelimit-limit-tokens: - '10000' x-ratelimit-remaining-requests: - - '199' + - '9998' x-ratelimit-remaining-tokens: - '9978' x-ratelimit-reset-requests: - - 7m12s + - 16.502s x-ratelimit-reset-tokens: - 132ms x-request-id: - - req_6ff271d00318adcd2408d8dcd5f93ec7 + - req_04c174debe2eace86b1e2777d7ac7265 status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml index 9a8b489489..b4d5acca4a 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_no_content.yaml @@ -1,13 +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", "parallel_tool_calls": 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", + "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 @@ -16,60 +45,91 @@ interactions: connection: - keep-alive content-length: - - '572' + - '543' content-type: - application/json host: - api.openai.com user-agent: - - OpenAI/Python 1.52.2 + - OpenAI/Python 1.26.0 x-stainless-arch: - - other:amd64 + - arm64 x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - Windows + - MacOS x-stainless-package-version: - - 1.52.2 - x-stainless-retry-count: - - '0' + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.7 + - 3.12.6 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-AMTFkpz8qllCCkh1A8xzoe14DwAQN\",\n \"object\": - \"chat.completion\",\n \"created\": 1729919028,\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_YBUn0S5ErhjkfnjFbWWJYIvR\",\n \"type\": - \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n - \ \"arguments\": \"{\\\"location\\\": \\\"Seattle, WA\\\"}\"\n - \ }\n },\n {\n \"id\": \"call_Ail5xuGFVRk2wUPidQWDYytn\",\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 },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": - 0\n }\n },\n \"system_fingerprint\": \"fp_f59a81427f\"\n}\n" + string: |- + { + "id": "chatcmpl-APfFQZB7CuqkWhGyMZegJZRX2Mqv7", + "object": "chat.completion", + "created": 1730680120, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_SBoEJuTov3qHLothPvvgZyO6", + "type": "function", + "function": { + "name": "get_current_weather", + "arguments": "{\"location\": \"Seattle, WA\"}" + } + }, + { + "id": "call_2nL8HxSquLkKxpTENiZ17ynv", + "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 + }, + "completion_tokens_details": { + "reasoning_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8d87e6e7ba75dee2-SEA + - 8dd07c3f4ba7ce35-SIN Connection: - keep-alive Content-Type: - application/json Date: - - Sat, 26 Oct 2024 05:03:49 GMT + - Mon, 04 Nov 2024 00:28:41 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -85,38 +145,74 @@ interactions: - '1180' openai-organization: test_organization openai-processing-ms: - - '649' + - '984' openai-version: - '2020-10-01' strict-transport-security: - max-age=31536000; includeSubDomains; preload x-ratelimit-limit-requests: - - '200' + - '10000' x-ratelimit-limit-tokens: - - '60000' + - '200000' x-ratelimit-remaining-requests: - - '198' + - '9994' x-ratelimit-remaining-tokens: - - '59961' + - '199961' x-ratelimit-reset-requests: - - 14m23.304s + - 45.38s x-ratelimit-reset-tokens: - - 39ms + - 11ms x-request-id: - - req_b2f085c19f19c32c8aa891887e228402 + - req_af3dca7532583ed0a68645314bcc9be0 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_YBUn0S5ErhjkfnjFbWWJYIvR", - "function": {"arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather"}, - "type": "function"}, {"id": "call_Ail5xuGFVRk2wUPidQWDYytn", "function": {"arguments": - "{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather"}, "type": - "function"}]}, {"role": "tool", "content": "50 degrees and raining", "tool_call_id": - "call_YBUn0S5ErhjkfnjFbWWJYIvR"}, {"role": "tool", "content": "70 degrees and - sunny", "tool_call_id": "call_Ail5xuGFVRk2wUPidQWDYytn"}], "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_SBoEJuTov3qHLothPvvgZyO6", + "function": { + "arguments": "{\"location\": \"Seattle, WA\"}", + "name": "get_current_weather" + }, + "type": "function" + }, + { + "id": "call_2nL8HxSquLkKxpTENiZ17ynv", + "function": { + "arguments": "{\"location\": \"San Francisco, CA\"}", + "name": "get_current_weather" + }, + "type": "function" + } + ] + }, + { + "role": "tool", + "content": "50 degrees and raining", + "tool_call_id": "call_SBoEJuTov3qHLothPvvgZyO6" + }, + { + "role": "tool", + "content": "70 degrees and sunny", + "tool_call_id": "call_2nL8HxSquLkKxpTENiZ17ynv" + } + ], + "model": "gpt-4o-mini" + } headers: accept: - application/json @@ -129,52 +225,72 @@ interactions: content-type: - application/json cookie: - - test_set_cookie + - __cf_bm=moy9FTa50Ug99_ZQaP2atn.PgzKoQyF7pvWqG_CIf54-1730680121-1.0.1.1-mczyecbBSU5hWl8uat1lcU6ya1g6MY.Oso_vHVilj7O8C2RJrObTEyzD5DAMphUCFqBYVGHMurXg16CMssvuNw; + _cfuvid=FpMMQOb0sz4wVuQI7b1RY2KJKVNyHctKOqsWAL4tph0-1730680121454-0.0.1.1-604800000 host: - api.openai.com user-agent: - - OpenAI/Python 1.52.2 + - OpenAI/Python 1.26.0 x-stainless-arch: - - other:amd64 + - arm64 x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - Windows + - MacOS x-stainless-package-version: - - 1.52.2 - x-stainless-retry-count: - - '0' + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.7 + - 3.12.6 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-AMTFlFwfqawbaH57GE3mXL8O17xo1\",\n \"object\": - \"chat.completion\",\n \"created\": 1729919029,\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 },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": - 0\n }\n },\n \"system_fingerprint\": \"fp_f59a81427f\"\n}\n" + string: |- + { + "id": "chatcmpl-APfFRbb22UJc07TGY9KcrrWO5fs9c", + "object": "chat.completion", + "created": 1730680121, + "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 + }, + "completion_tokens_details": { + "reasoning_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8d87e6ec8ddedee2-SEA + - 8dd07c473cc4ce35-SIN Connection: - keep-alive Content-Type: - application/json Date: - - Sat, 26 Oct 2024 05:03:49 GMT + - Mon, 04 Nov 2024 00:28:42 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -187,28 +303,28 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '732' + - '731' openai-organization: test_organization openai-processing-ms: - - '537' + - '380' openai-version: - '2020-10-01' strict-transport-security: - max-age=31536000; includeSubDomains; preload x-ratelimit-limit-requests: - - '200' + - '10000' x-ratelimit-limit-tokens: - - '60000' + - '200000' x-ratelimit-remaining-requests: - - '197' + - '9993' x-ratelimit-remaining-tokens: - - '59948' + - '199947' x-ratelimit-reset-requests: - - 21m34.534s + - 52.749s x-ratelimit-reset-tokens: - - 52ms + - 15ms x-request-id: - - req_ca78782b171f5cd60841ba443de92731 + - req_f56de3d8b168900542a01b971b367a9f status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml index 9a8b489489..fbf1abd640 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_tool_calls_with_content.yaml @@ -1,13 +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", "parallel_tool_calls": 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", + "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 @@ -16,60 +45,91 @@ interactions: connection: - keep-alive content-length: - - '572' + - '543' content-type: - application/json host: - api.openai.com user-agent: - - OpenAI/Python 1.52.2 + - OpenAI/Python 1.26.0 x-stainless-arch: - - other:amd64 + - arm64 x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - Windows + - MacOS x-stainless-package-version: - - 1.52.2 - x-stainless-retry-count: - - '0' + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.7 + - 3.12.6 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-AMTFkpz8qllCCkh1A8xzoe14DwAQN\",\n \"object\": - \"chat.completion\",\n \"created\": 1729919028,\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_YBUn0S5ErhjkfnjFbWWJYIvR\",\n \"type\": - \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n - \ \"arguments\": \"{\\\"location\\\": \\\"Seattle, WA\\\"}\"\n - \ }\n },\n {\n \"id\": \"call_Ail5xuGFVRk2wUPidQWDYytn\",\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 },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": - 0\n }\n },\n \"system_fingerprint\": \"fp_f59a81427f\"\n}\n" + string: |- + { + "id": "chatcmpl-APfFOuWLsYvVpZYqENRo9rKnifNdD", + "object": "chat.completion", + "created": 1730680118, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_6YvurIMPOgMo2q6V6KGJDA6g", + "type": "function", + "function": { + "name": "get_current_weather", + "arguments": "{\"location\": \"Seattle, WA\"}" + } + }, + { + "id": "call_QSiqEulo25M3NtTLVbMGqY91", + "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 + }, + "completion_tokens_details": { + "reasoning_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8d87e6e7ba75dee2-SEA + - 8dd07c349cb38bcb-SIN Connection: - keep-alive Content-Type: - application/json Date: - - Sat, 26 Oct 2024 05:03:49 GMT + - Mon, 04 Nov 2024 00:28:39 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -85,38 +145,74 @@ interactions: - '1180' openai-organization: test_organization openai-processing-ms: - - '649' + - '631' openai-version: - '2020-10-01' strict-transport-security: - max-age=31536000; includeSubDomains; preload x-ratelimit-limit-requests: - - '200' + - '10000' x-ratelimit-limit-tokens: - - '60000' + - '200000' x-ratelimit-remaining-requests: - - '198' + - '9996' x-ratelimit-remaining-tokens: - - '59961' + - '199961' x-ratelimit-reset-requests: - - 14m23.304s + - 29.791s x-ratelimit-reset-tokens: - - 39ms + - 11ms x-request-id: - - req_b2f085c19f19c32c8aa891887e228402 + - req_a121f023915b3c4a2ca2415663e54dd8 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_YBUn0S5ErhjkfnjFbWWJYIvR", - "function": {"arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather"}, - "type": "function"}, {"id": "call_Ail5xuGFVRk2wUPidQWDYytn", "function": {"arguments": - "{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather"}, "type": - "function"}]}, {"role": "tool", "content": "50 degrees and raining", "tool_call_id": - "call_YBUn0S5ErhjkfnjFbWWJYIvR"}, {"role": "tool", "content": "70 degrees and - sunny", "tool_call_id": "call_Ail5xuGFVRk2wUPidQWDYytn"}], "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_6YvurIMPOgMo2q6V6KGJDA6g", + "function": { + "arguments": "{\"location\": \"Seattle, WA\"}", + "name": "get_current_weather" + }, + "type": "function" + }, + { + "id": "call_QSiqEulo25M3NtTLVbMGqY91", + "function": { + "arguments": "{\"location\": \"San Francisco, CA\"}", + "name": "get_current_weather" + }, + "type": "function" + } + ] + }, + { + "role": "tool", + "content": "50 degrees and raining", + "tool_call_id": "call_6YvurIMPOgMo2q6V6KGJDA6g" + }, + { + "role": "tool", + "content": "70 degrees and sunny", + "tool_call_id": "call_QSiqEulo25M3NtTLVbMGqY91" + } + ], + "model": "gpt-4o-mini" + } headers: accept: - application/json @@ -129,52 +225,72 @@ interactions: content-type: - application/json cookie: - - test_set_cookie + - __cf_bm=Fyf0tyDn1mwa_82CHRs1nppW_PehJkXoYvNM4ZjPbXY-1730680119-1.0.1.1-yjV4_xtp96WEMEexlzeQsjZfgRKwMtgjBU5ysQffHMNwXbTqmZdE_pCTtQTmJ97xP37rkkAHdzC7O8661FKZ9A; + _cfuvid=WLvZI_.UlWSOmjux14bNggQUKClph3WCDG.6pjaRbjI-1730680119424-0.0.1.1-604800000 host: - api.openai.com user-agent: - - OpenAI/Python 1.52.2 + - OpenAI/Python 1.26.0 x-stainless-arch: - - other:amd64 + - arm64 x-stainless-async: - 'false' x-stainless-lang: - python x-stainless-os: - - Windows + - MacOS x-stainless-package-version: - - 1.52.2 - x-stainless-retry-count: - - '0' + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.12.7 + - 3.12.6 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-AMTFlFwfqawbaH57GE3mXL8O17xo1\",\n \"object\": - \"chat.completion\",\n \"created\": 1729919029,\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 },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": - 0\n }\n },\n \"system_fingerprint\": \"fp_f59a81427f\"\n}\n" + string: |- + { + "id": "chatcmpl-APfFP2ZYRsgIvw0HuTVbYFDxFs7Si", + "object": "chat.completion", + "created": 1730680119, + "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 + }, + "completion_tokens_details": { + "reasoning_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8d87e6ec8ddedee2-SEA + - 8dd07c3ad9138bcb-SIN Connection: - keep-alive Content-Type: - application/json Date: - - Sat, 26 Oct 2024 05:03:49 GMT + - Mon, 04 Nov 2024 00:28:40 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -187,28 +303,28 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '732' + - '731' openai-organization: test_organization openai-processing-ms: - - '537' + - '390' openai-version: - '2020-10-01' strict-transport-security: - max-age=31536000; includeSubDomains; preload x-ratelimit-limit-requests: - - '200' + - '10000' x-ratelimit-limit-tokens: - - '60000' + - '200000' x-ratelimit-remaining-requests: - - '197' + - '9995' x-ratelimit-remaining-tokens: - - '59948' + - '199947' x-ratelimit-reset-requests: - - 21m34.534s + - 37.448s x-ratelimit-reset-tokens: - - 52ms + - 15ms x-request-id: - - req_ca78782b171f5cd60841ba443de92731 + - req_525d3b9301fff00a98647143a9c26b6f status: code: 200 message: OK diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml index 3bfd94e415..bb61c001fb 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/cassettes/test_chat_completion_with_content.yaml @@ -1,7 +1,16 @@ interactions: - request: - body: '{"messages": [{"role": "user", "content": "Say this is a test"}], "model": - "gpt-4", "stream": false}' + body: |- + { + "messages": [ + { + "role": "user", + "content": "Say this is a test" + } + ], + "model": "gpt-4o-mini", + "stream": false + } headers: accept: - application/json @@ -10,13 +19,13 @@ interactions: connection: - keep-alive content-length: - - '100' + - '106' content-type: - application/json host: - api.openai.com user-agent: - - OpenAI/Python 1.47.0 + - OpenAI/Python 1.26.0 x-stainless-arch: - arm64 x-stainless-async: @@ -26,34 +35,57 @@ interactions: x-stainless-os: - MacOS x-stainless-package-version: - - 1.47.0 + - 1.26.0 x-stainless-runtime: - CPython x-stainless-runtime-version: - - 3.11.5 + - 3.12.6 method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-AC6ajKKHHpvf6x2Qm35t6m3QE8qli\",\n \"object\": - \"chat.completion\",\n \"created\": 1727448637,\n \"model\": \"gpt-4-0613\",\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 \"completion_tokens_details\": {\n \"reasoning_tokens\": - 0\n }\n },\n \"system_fingerprint\": null\n}\n" + string: |- + { + "id": "chatcmpl-APfFJNBzCZVUpMJMK5KBhu4D6yVAc", + "object": "chat.completion", + "created": 1730680113, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "This is a test! How can I assist you today?", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12, + "completion_tokens": 12, + "total_tokens": 24, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0 + } + }, + "system_fingerprint": "fp_0ba0d124f1" + } headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8c9c4e9b7fb674d8-PMO + - 8dd07c16eae44a1d-SIN Connection: - keep-alive Content-Type: - application/json Date: - - Fri, 27 Sep 2024 14:50:37 GMT + - Mon, 04 Nov 2024 00:28:34 GMT Server: - cloudflare Set-Cookie: test_set_cookie @@ -63,11 +95,13 @@ interactions: - nosniff access-control-expose-headers: - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 content-length: - - '551' + - '666' openai-organization: test_organization openai-processing-ms: - - '434' + - '732' openai-version: - '2020-10-01' strict-transport-security: @@ -75,17 +109,17 @@ interactions: x-ratelimit-limit-requests: - '10000' x-ratelimit-limit-tokens: - - '1000000' + - '200000' x-ratelimit-remaining-requests: - '9999' x-ratelimit-remaining-tokens: - - '999977' + - '199977' x-ratelimit-reset-requests: - - 6ms + - 8.64s x-ratelimit-reset-tokens: - - 1ms + - 6ms x-request-id: - - req_5f2690abaf909a9f047488694d44495e + - req_0bb3c9da7d953e477d1947130d2cf1df 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 f35dfbacf2..84a9bf2692 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/conftest.py @@ -1,8 +1,10 @@ """Unit tests configuration module.""" +import json import os import pytest +import yaml from openai import OpenAI from opentelemetry.instrumentation.openai_v2 import OpenAIInstrumentor @@ -98,6 +100,73 @@ def instrument_with_content(tracer_provider, event_logger_provider): instrumentor.uninstrument() +class LiteralBlockScalar(str): + """Formats the string as a literal block scalar, preserving whitespace and + without interpreting escape characters""" + + +def literal_block_scalar_presenter(dumper, data): + """Represents a scalar string as a literal block, via '|' syntax""" + return dumper.represent_scalar("tag:yaml.org,2002:str", data, style="|") + + +yaml.add_representer(LiteralBlockScalar, literal_block_scalar_presenter) + + +def process_string_value(string_value): + """Pretty-prints JSON or returns long strings as a LiteralBlockScalar""" + try: + json_data = json.loads(string_value) + return LiteralBlockScalar(json.dumps(json_data, indent=2)) + except (ValueError, TypeError): + if len(string_value) > 80: + return LiteralBlockScalar(string_value) + return string_value + + +def convert_body_to_literal(data): + """Searches the data for body strings, attempting to pretty-print JSON""" + if isinstance(data, dict): + for key, value in data.items(): + # Handle response body case (e.g., response.body.string) + if key == "body" and isinstance(value, dict) and "string" in value: + value["string"] = process_string_value(value["string"]) + + # Handle request body case (e.g., request.body) + elif key == "body" and isinstance(value, str): + data[key] = process_string_value(value) + + else: + convert_body_to_literal(value) + + elif isinstance(data, list): + for idx, choice in enumerate(data): + data[idx] = convert_body_to_literal(choice) + + return data + + +class PrettyPrintJSONBody: + """This makes request and response body recordings more readable.""" + + @staticmethod + def serialize(cassette_dict): + cassette_dict = convert_body_to_literal(cassette_dict) + return yaml.dump( + cassette_dict, default_flow_style=False, allow_unicode=True + ) + + @staticmethod + def deserialize(cassette_string): + return yaml.load(cassette_string, Loader=yaml.Loader) + + +@pytest.fixture(scope="module") +def fixture_vcr(vcr): + vcr.register_serializer("yaml", PrettyPrintJSONBody) + return vcr + + def scrub_response_headers(response): """ This scrubs sensitive response headers. Note they are case-sensitive! diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py index 4369aa6a38..c6cb19aa8d 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py @@ -16,7 +16,7 @@ from typing import Optional import pytest -from openai import OpenAI +from openai import APIConnectionError, NotFoundError, OpenAI from openai.resources.chat.completions import ChatCompletion from opentelemetry.sdk.trace import ReadableSpan @@ -73,16 +73,12 @@ def test_chat_completion_bad_endpoint(span_exporter, instrument_no_content): client = OpenAI(base_url="http://localhost:4242") - exception = None - try: + with pytest.raises(APIConnectionError): client.chat.completions.create( messages=messages_value, model=llm_model_value, timeout=0.1, ) - assert False, "Expected an exception" - except Exception as ex: # pylint: disable=broad-exception-caught - exception = ex spans = span_exporter.get_finished_spans() assert_all_attributes( @@ -90,8 +86,7 @@ def test_chat_completion_bad_endpoint(span_exporter, instrument_no_content): ) assert 4242 == spans[0].attributes[ServerAttributes.SERVER_PORT] assert ( - type(exception).__qualname__ - == spans[0].attributes[ErrorAttributes.ERROR_TYPE] + "APIConnectionError" == spans[0].attributes[ErrorAttributes.ERROR_TYPE] ) @@ -102,24 +97,16 @@ def test_chat_completion_404( llm_model_value = "this-model-does-not-exist" messages_value = [{"role": "user", "content": "Say this is a test"}] - exception = None - try: + with pytest.raises(NotFoundError): openai_client.chat.completions.create( messages=messages_value, model=llm_model_value, - timeout=0.1, ) - assert False, "Expected an exception" - except Exception as ex: # pylint: disable=broad-exception-caught - exception = ex spans = span_exporter.get_finished_spans() assert_all_attributes(spans[0], llm_model_value) - assert ( - type(exception).__qualname__ - == spans[0].attributes[ErrorAttributes.ERROR_TYPE] - ) + assert "NotFoundError" == spans[0].attributes[ErrorAttributes.ERROR_TYPE] @pytest.mark.vcr()