Skip to content

Commit 0dacda8

Browse files
committed
fix tests runtime warnings
1 parent acdf2f2 commit 0dacda8

File tree

3 files changed

+432
-2
lines changed

3 files changed

+432
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
interactions:
2+
- request:
3+
body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."},
4+
{"role": "user", "content": "What''s the weather in Seattle and San Francisco
5+
today?"}], "model": "gpt-4o-mini", "tool_choice": "auto", "tools": [{"type":
6+
"function", "function": {"name": "get_current_weather", "description": "Get
7+
the current weather in a given location", "parameters": {"type": "object", "properties":
8+
{"location": {"type": "string", "description": "The city and state, e.g. Boston,
9+
MA"}}, "required": ["location"], "additionalProperties": false}}}]}'
10+
headers:
11+
accept:
12+
- application/json
13+
accept-encoding:
14+
- gzip, deflate
15+
connection:
16+
- keep-alive
17+
content-length:
18+
- '543'
19+
content-type:
20+
- application/json
21+
host:
22+
- api.openai.com
23+
user-agent:
24+
- AsyncOpenAI/Python 1.26.0
25+
x-stainless-arch:
26+
- arm64
27+
x-stainless-async:
28+
- async:asyncio
29+
x-stainless-lang:
30+
- python
31+
x-stainless-os:
32+
- MacOS
33+
x-stainless-package-version:
34+
- 1.26.0
35+
x-stainless-runtime:
36+
- CPython
37+
x-stainless-runtime-version:
38+
- 3.12.5
39+
method: POST
40+
uri: https://api.openai.com/v1/chat/completions
41+
response:
42+
body:
43+
string: "{\n \"id\": \"chatcmpl-ARJkWSl3FJCaxY2M5c1mIZXvCkIb0\",\n \"object\":
44+
\"chat.completion\",\n \"created\": 1731074136,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n
45+
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
46+
\"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n
47+
\ \"id\": \"call_Hmg9bHwsiXUofekPckiN91TS\",\n \"type\":
48+
\"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n
49+
\ \"arguments\": \"{\\\"location\\\": \\\"Seattle, WA\\\"}\"\n
50+
\ }\n },\n {\n \"id\": \"call_75j1tY784nud9uU0kR9r0lfN\",\n
51+
\ \"type\": \"function\",\n \"function\": {\n \"name\":
52+
\"get_current_weather\",\n \"arguments\": \"{\\\"location\\\":
53+
\\\"San Francisco, CA\\\"}\"\n }\n }\n ],\n \"refusal\":
54+
null\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n
55+
\ }\n ],\n \"usage\": {\n \"prompt_tokens\": 75,\n \"completion_tokens\":
56+
51,\n \"total_tokens\": 126,\n \"prompt_tokens_details\": {\n \"cached_tokens\":
57+
0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\":
58+
{\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\":
59+
0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\":
60+
\"fp_0ba0d124f1\"\n}\n"
61+
headers:
62+
CF-Cache-Status:
63+
- DYNAMIC
64+
CF-RAY:
65+
- 8df60fc96b19e27a-MRS
66+
Connection:
67+
- keep-alive
68+
Content-Type:
69+
- application/json
70+
Date:
71+
- Fri, 08 Nov 2024 13:55:37 GMT
72+
Server:
73+
- cloudflare
74+
Set-Cookie: test_set_cookie
75+
Transfer-Encoding:
76+
- chunked
77+
X-Content-Type-Options:
78+
- nosniff
79+
access-control-expose-headers:
80+
- X-Request-ID
81+
alt-svc:
82+
- h3=":443"; ma=86400
83+
content-length:
84+
- '1308'
85+
openai-organization: test_organization
86+
openai-processing-ms:
87+
- '1022'
88+
openai-version:
89+
- '2020-10-01'
90+
strict-transport-security:
91+
- max-age=31536000; includeSubDomains; preload
92+
x-ratelimit-limit-requests:
93+
- '30000'
94+
x-ratelimit-limit-tokens:
95+
- '150000000'
96+
x-ratelimit-remaining-requests:
97+
- '29999'
98+
x-ratelimit-remaining-tokens:
99+
- '149999960'
100+
x-ratelimit-reset-requests:
101+
- 2ms
102+
x-ratelimit-reset-tokens:
103+
- 0s
104+
x-request-id:
105+
- req_34ca1c97461dd1272256b64988bd56ff
106+
status:
107+
code: 200
108+
message: OK
109+
- request:
110+
body: '{"messages": [{"role": "system", "content": "You''re a helpful assistant."},
111+
{"role": "user", "content": "What''s the weather in Seattle and San Francisco
112+
today?"}, {"role": "assistant", "tool_calls": [{"id": "call_Hmg9bHwsiXUofekPckiN91TS",
113+
"function": {"arguments": "{\"location\": \"Seattle, WA\"}", "name": "get_current_weather"},
114+
"type": "function"}, {"id": "call_75j1tY784nud9uU0kR9r0lfN", "function": {"arguments":
115+
"{\"location\": \"San Francisco, CA\"}", "name": "get_current_weather"}, "type":
116+
"function"}]}, {"role": "tool", "content": "50 degrees and raining", "tool_call_id":
117+
"call_Hmg9bHwsiXUofekPckiN91TS"}, {"role": "tool", "content": "70 degrees and
118+
sunny", "tool_call_id": "call_75j1tY784nud9uU0kR9r0lfN"}], "model": "gpt-4o-mini"}'
119+
headers:
120+
accept:
121+
- application/json
122+
accept-encoding:
123+
- gzip, deflate
124+
connection:
125+
- keep-alive
126+
content-length:
127+
- '746'
128+
content-type:
129+
- application/json
130+
cookie:
131+
- __cf_bm=9IFaLwbVtK7uOEFE2dslUkFDFTCFSZEUsU3yr6pZ_3I-1731074137-1.0.1.1-3uYq4aPispFdfxboed6vtN_eKem1xnkFZrlgg2PtlQbpidFIlCI11ZDKeF5k0OAI3Nh0sv_WoFbVqx22I2JsEQ;
132+
_cfuvid=5bL_g45Wr1SP1uqQC1y2L.xbhNhBsaU4gvhrperwPYY-1731074137720-0.0.1.1-604800000
133+
host:
134+
- api.openai.com
135+
user-agent:
136+
- AsyncOpenAI/Python 1.26.0
137+
x-stainless-arch:
138+
- arm64
139+
x-stainless-async:
140+
- async:asyncio
141+
x-stainless-lang:
142+
- python
143+
x-stainless-os:
144+
- MacOS
145+
x-stainless-package-version:
146+
- 1.26.0
147+
x-stainless-runtime:
148+
- CPython
149+
x-stainless-runtime-version:
150+
- 3.12.5
151+
method: POST
152+
uri: https://api.openai.com/v1/chat/completions
153+
response:
154+
body:
155+
string: "{\n \"id\": \"chatcmpl-ARJkXLOI2fMtY8OJk08OqQ957oW12\",\n \"object\":
156+
\"chat.completion\",\n \"created\": 1731074137,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n
157+
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
158+
\"assistant\",\n \"content\": \"Today, the weather in Seattle is 50
159+
degrees and raining, while in San Francisco, it's 70 degrees and sunny.\",\n
160+
\ \"refusal\": null\n },\n \"logprobs\": null,\n \"finish_reason\":
161+
\"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 99,\n \"completion_tokens\":
162+
25,\n \"total_tokens\": 124,\n \"prompt_tokens_details\": {\n \"cached_tokens\":
163+
0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\":
164+
{\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\":
165+
0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\":
166+
\"fp_0ba0d124f1\"\n}\n"
167+
headers:
168+
CF-Cache-Status:
169+
- DYNAMIC
170+
CF-RAY:
171+
- 8df60fd12862e27a-MRS
172+
Connection:
173+
- keep-alive
174+
Content-Type:
175+
- application/json
176+
Date:
177+
- Fri, 08 Nov 2024 13:55:38 GMT
178+
Server:
179+
- cloudflare
180+
Set-Cookie: test_set_cookie
181+
Transfer-Encoding:
182+
- chunked
183+
X-Content-Type-Options:
184+
- nosniff
185+
access-control-expose-headers:
186+
- X-Request-ID
187+
alt-svc:
188+
- h3=":443"; ma=86400
189+
content-length:
190+
- '859'
191+
openai-organization: test_organization
192+
openai-processing-ms:
193+
- '625'
194+
openai-version:
195+
- '2020-10-01'
196+
strict-transport-security:
197+
- max-age=31536000; includeSubDomains; preload
198+
x-ratelimit-limit-requests:
199+
- '30000'
200+
x-ratelimit-limit-tokens:
201+
- '150000000'
202+
x-ratelimit-remaining-requests:
203+
- '29999'
204+
x-ratelimit-remaining-tokens:
205+
- '149999948'
206+
x-ratelimit-reset-requests:
207+
- 2ms
208+
x-ratelimit-reset-tokens:
209+
- 0s
210+
x-request-id:
211+
- req_7f3194ba56f6e84bfbec244bc9e697c7
212+
status:
213+
code: 200
214+
message: OK
215+
version: 1

0 commit comments

Comments
 (0)