Skip to content

Commit b6e374e

Browse files
authored
chore(py): fix integration test (#1677)
1 parent 48edbfd commit b6e374e

File tree

1 file changed

+118
-0
lines changed

1 file changed

+118
-0
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
interactions:
2+
- request:
3+
body: '{"messages":[{"role":"user","content":"What''s the weather like in Paris?"}],"model":"gpt-4o","stream":true,"tool_choice":"auto","tools":[{"type":"function","function":{"name":"get_weather","description":"Get
4+
the current weather in a given city.","parameters":{"type":"object","properties":{"location":{"type":"string","description":"The
5+
city to get the weather for"}},"required":["location"]}}}]}'
6+
headers:
7+
accept:
8+
- application/json
9+
accept-encoding:
10+
- gzip, deflate, zstd
11+
connection:
12+
- keep-alive
13+
content-length:
14+
- '396'
15+
content-type:
16+
- application/json
17+
host:
18+
- api.openai.com
19+
x-stainless-arch:
20+
- arm64
21+
x-stainless-async:
22+
- async:asyncio
23+
x-stainless-lang:
24+
- python
25+
x-stainless-os:
26+
- MacOS
27+
x-stainless-package-version:
28+
- 1.68.2
29+
x-stainless-read-timeout:
30+
- '600'
31+
x-stainless-retry-count:
32+
- '0'
33+
x-stainless-runtime:
34+
- CPython
35+
x-stainless-runtime-version:
36+
- 3.11.3
37+
method: POST
38+
uri: https://api.openai.com/v1/chat/completions
39+
response:
40+
body:
41+
string: 'data: {"id":"chatcmpl-BOpXo2FaryhMGZSTINyPFRvGd2fBo","object":"chat.completion.chunk","created":1745257708,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_55d88aaf2f","choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_3nuop1P58UGYNd2zVPxDFExo","type":"function","function":{"name":"get_weather","arguments":""}}],"refusal":null},"logprobs":null,"finish_reason":null}]}
42+
43+
44+
data: {"id":"chatcmpl-BOpXo2FaryhMGZSTINyPFRvGd2fBo","object":"chat.completion.chunk","created":1745257708,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_55d88aaf2f","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"logprobs":null,"finish_reason":null}]}
45+
46+
47+
data: {"id":"chatcmpl-BOpXo2FaryhMGZSTINyPFRvGd2fBo","object":"chat.completion.chunk","created":1745257708,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_55d88aaf2f","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"location"}}]},"logprobs":null,"finish_reason":null}]}
48+
49+
50+
data: {"id":"chatcmpl-BOpXo2FaryhMGZSTINyPFRvGd2fBo","object":"chat.completion.chunk","created":1745257708,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_55d88aaf2f","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}]}
51+
52+
53+
data: {"id":"chatcmpl-BOpXo2FaryhMGZSTINyPFRvGd2fBo","object":"chat.completion.chunk","created":1745257708,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_55d88aaf2f","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Paris"}}]},"logprobs":null,"finish_reason":null}]}
54+
55+
56+
data: {"id":"chatcmpl-BOpXo2FaryhMGZSTINyPFRvGd2fBo","object":"chat.completion.chunk","created":1745257708,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_55d88aaf2f","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"logprobs":null,"finish_reason":null}]}
57+
58+
59+
data: {"id":"chatcmpl-BOpXo2FaryhMGZSTINyPFRvGd2fBo","object":"chat.completion.chunk","created":1745257708,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_55d88aaf2f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}]}
60+
61+
62+
data: [DONE]
63+
64+
65+
'
66+
headers:
67+
CF-RAY:
68+
- 933eb66358bd78ea-LAX
69+
Connection:
70+
- keep-alive
71+
Content-Type:
72+
- text/event-stream; charset=utf-8
73+
Date:
74+
- Mon, 21 Apr 2025 17:48:29 GMT
75+
Server:
76+
- cloudflare
77+
Set-Cookie:
78+
- __cf_bm=ZCY7YiZ0KYDP5iFOV.9jkiL31TAAWfev9BTWGRFVRoQ-1745257709-1.0.1.1-wUHqsX.wda1MMe8N0ghjtMYLPkdH1GqSl0NGU7nu22MjkYGiHYch9NGA1Jss0fudrSgzPZ1iyx47cB3QroqLPnyoiJ1fjt.Cj7dIYZibkLE;
79+
path=/; expires=Mon, 21-Apr-25 18:18:29 GMT; domain=.api.openai.com; HttpOnly;
80+
Secure; SameSite=None
81+
- _cfuvid=.TIzlaZK7SqT_rJQvQ11O24IRVWGCr2GBjKSyhl8q0k-1745257709005-0.0.1.1-604800000;
82+
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
83+
Transfer-Encoding:
84+
- chunked
85+
X-Content-Type-Options:
86+
- nosniff
87+
access-control-expose-headers:
88+
- X-Request-ID
89+
alt-svc:
90+
- h3=":443"; ma=86400
91+
cf-cache-status:
92+
- DYNAMIC
93+
openai-organization:
94+
- langchain
95+
openai-processing-ms:
96+
- '613'
97+
openai-version:
98+
- '2020-10-01'
99+
strict-transport-security:
100+
- max-age=31536000; includeSubDomains; preload
101+
x-ratelimit-limit-requests:
102+
- '10000'
103+
x-ratelimit-limit-tokens:
104+
- '30000000'
105+
x-ratelimit-remaining-requests:
106+
- '9999'
107+
x-ratelimit-remaining-tokens:
108+
- '29999989'
109+
x-ratelimit-reset-requests:
110+
- 6ms
111+
x-ratelimit-reset-tokens:
112+
- 0s
113+
x-request-id:
114+
- req_1720ba3c7ba7c4cfc3e2f8fb4fe58eaa
115+
status:
116+
code: 200
117+
message: OK
118+
version: 1

0 commit comments

Comments
 (0)