Skip to content

Commit e0af302

Browse files
committed
Added mark vcr decorator to a bunch of tests, with fixtures
1 parent 6716bcc commit e0af302

21 files changed

+2335
-24
lines changed

tests/cassettes/TestHTTPAgentClient.test_lifecycle.yaml

Lines changed: 713 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
interactions:
2+
- request:
3+
body:
4+
'{"messages": [{"role": "system", "content": "Respond following this JSON
5+
schema:\n\n{\n \"properties\": {\n \"name\": {\n \"title\": \"Name\",\n \"type\":
6+
\"string\"\n },\n \"age\": {\n \"title\": \"Age\",\n \"type\":
7+
\"integer\"\n }\n },\n \"required\": [\n \"name\",\n \"age\"\n ],\n \"title\":
8+
\"DummyOutputSchema\",\n \"type\": \"object\"\n}"}, {"role": "user", "content":
9+
"My name is Claude and I am 1 year old. What is my name and age?"}], "model":
10+
"gpt-3.5-turbo", "response_format": {"type": "json_object"}}'
11+
headers:
12+
accept:
13+
- application/json
14+
accept-encoding:
15+
- gzip, deflate
16+
connection:
17+
- keep-alive
18+
content-length:
19+
- "559"
20+
content-type:
21+
- application/json
22+
host:
23+
- api.openai.com
24+
user-agent:
25+
- AsyncOpenAI/Python 1.44.1
26+
x-stainless-arch:
27+
- arm64
28+
x-stainless-async:
29+
- async:asyncio
30+
x-stainless-lang:
31+
- python
32+
x-stainless-os:
33+
- MacOS
34+
x-stainless-package-version:
35+
- 1.44.1
36+
x-stainless-raw-response:
37+
- "true"
38+
x-stainless-runtime:
39+
- CPython
40+
x-stainless-runtime-version:
41+
- 3.12.5
42+
method: POST
43+
uri: https://api.openai.com/v1/chat/completions
44+
response:
45+
body:
46+
string: !!binary |
47+
H4sIAAAAAAAAA1SQzW7CMBCE73mK1Z4TREghIbeqVXurekFV21TIJEswdWzLdgQI8e6VTfjpxYf5
48+
POMZHyMA5A2WgPWGubrTInmcvRfZ4evjk78U+vU5e9i+LXb73aIxOcsx9g612lLtLq5RrTotyHEl
49+
z7g2xBz51DSfzMbFfD7JA+hUQ8LbWu2SbDRNXG9WKhmnk+ng3Chek8USviMAgGM4fUfZ0B5LGMcX
50+
pSNrWUtYXi8BoFHCK8is5dYx6TC+wVpJRzLUPlYSoELJOqqwhAqfBOsbqjA+A9YGPa3k6T7B0Lq3
51+
zC+QvRCDfrpWEqrVRq3swK/6mktuN0tDzCrpn7dOaQz0FAH8hOn9vzWojeq0Wzr1S9IHpmlxzsPb
52+
b9/RfIBOOSbu9GwaDQ3RHqyjbrnmsiWjDQ8/EXacoj8AAAD//wMANu8s3AgCAAA=
53+
headers:
54+
CF-Cache-Status:
55+
- DYNAMIC
56+
CF-RAY:
57+
- 8c1abafcea3c171a-SJC
58+
Connection:
59+
- keep-alive
60+
Content-Encoding:
61+
- gzip
62+
Content-Type:
63+
- application/json
64+
Date:
65+
- Wed, 11 Sep 2024 21:25:27 GMT
66+
Server:
67+
- cloudflare
68+
Transfer-Encoding:
69+
- chunked
70+
X-Content-Type-Options:
71+
- nosniff
72+
access-control-expose-headers:
73+
- X-Request-ID
74+
alt-svc:
75+
- h3=":443"; ma=86400
76+
openai-organization:
77+
- future-house-xr4tdh
78+
openai-processing-ms:
79+
- "267"
80+
openai-version:
81+
- "2020-10-01"
82+
strict-transport-security:
83+
- max-age=15552000; includeSubDomains; preload
84+
x-ratelimit-limit-requests:
85+
- "12000"
86+
x-ratelimit-limit-tokens:
87+
- "1000000"
88+
x-ratelimit-remaining-requests:
89+
- "11999"
90+
x-ratelimit-remaining-tokens:
91+
- "999838"
92+
x-ratelimit-reset-requests:
93+
- 5ms
94+
x-ratelimit-reset-tokens:
95+
- 9ms
96+
x-request-id:
97+
- req_65355d90c1cb42732d3c85abb2413f94
98+
status:
99+
code: 200
100+
message: OK
101+
version: 1
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
interactions:
2+
- request:
3+
body:
4+
'{"messages": [{"role": "user", "content": [{"type": "image", "source":
5+
{"type": "base64", "media_type": "image/png", "data": "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR4nO3NMQEAAAjDMMC/ZzDBvlRA01vZJvwHAAAAAAAAAAAAbx2jxAE/i2AjOgAAAABJRU5ErkJggg=="}},
6+
{"type": "text", "text": "What color is this square? Respond only with the color
7+
name."}]}], "max_tokens": 4096, "model": "claude-3-haiku-20240307"}'
8+
headers:
9+
accept:
10+
- application/json
11+
accept-encoding:
12+
- gzip, deflate
13+
anthropic-version:
14+
- "2023-06-01"
15+
connection:
16+
- keep-alive
17+
content-length:
18+
- "411"
19+
content-type:
20+
- application/json
21+
host:
22+
- api.anthropic.com
23+
user-agent:
24+
- litellm/1.44.24
25+
method: POST
26+
uri: https://api.anthropic.com/v1/messages
27+
response:
28+
body:
29+
string: !!binary |
30+
H4sIAAAAAAAAA0yOT2vCQBDFv8s7byBNBOlehV5KRUS9SAlLdqrBdTZmZool5LuXiIWeHvzeH96I
31+
LsLjKqemfNnFj3U4L982h9V2d/ve1/b+RQMc9KenOUUi4URwGHKaQRDpRAMrHK45UoJHm4JFKuri
32+
HLqLFVVZLcq6XMKhzazECn8c/xaV7nP3IR5bipg+HURz3wwUJDM8iGOjNjCehtDNiFuCZ0vJwR6f
33+
/IiOe9NG84VY4KtXh2z6Hy2m6RcAAP//AwB6WGlZ8AAAAA==
34+
headers:
35+
CF-Cache-Status:
36+
- DYNAMIC
37+
CF-RAY:
38+
- 8c1aba3c6c959664-SJC
39+
Connection:
40+
- keep-alive
41+
Content-Encoding:
42+
- gzip
43+
Content-Type:
44+
- application/json
45+
Date:
46+
- Wed, 11 Sep 2024 21:24:56 GMT
47+
Server:
48+
- cloudflare
49+
Transfer-Encoding:
50+
- chunked
51+
X-Robots-Tag:
52+
- none
53+
request-id:
54+
- req_01HzTrvjM4ny4Fa5TnY8n8pE
55+
via:
56+
- 1.1 google
57+
x-cloud-trace-context:
58+
- 4ab7e744703e1034c4b84f8d53549416
59+
status:
60+
code: 200
61+
message: OK
62+
version: 1
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
interactions:
2+
- request:
3+
body:
4+
'{"messages": [{"role": "user", "content": [{"type": "image_url", "image_url":
5+
{"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR4nO3NMQEAAAjDMMC/ZzDBvlRA01vZJvwHAAAAAAAAAAAAbx2jxAE/i2AjOgAAAABJRU5ErkJggg=="}},
6+
{"type": "text", "text": "What color is this square? Respond only with the color
7+
name."}]}], "model": "gpt-4-turbo"}'
8+
headers:
9+
accept:
10+
- application/json
11+
accept-encoding:
12+
- gzip, deflate
13+
connection:
14+
- keep-alive
15+
content-length:
16+
- "362"
17+
content-type:
18+
- application/json
19+
host:
20+
- api.openai.com
21+
user-agent:
22+
- AsyncOpenAI/Python 1.44.1
23+
x-stainless-arch:
24+
- arm64
25+
x-stainless-async:
26+
- async:asyncio
27+
x-stainless-lang:
28+
- python
29+
x-stainless-os:
30+
- MacOS
31+
x-stainless-package-version:
32+
- 1.44.1
33+
x-stainless-raw-response:
34+
- "true"
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: !!binary |
44+
H4sIAAAAAAAAA1SQS0/DMBCE7/kV1p4blIT0kdyQSrkgBEVwQShykk3i4tiWvUGgqv8dOU0fXPYw
45+
n2d21vuAMRA15AyqjlPVGxneLZ6X5dP29n39+F12r5t487LbZe6eHtbxG8y8Q5c7rOjkuql0bySS
46+
0OqIK4uc0KfGy2QRrbJVlo2g1zVKb2sNhWlIgy11mERJGkZpGGWTu9OiQgc5+wgYY2w/Tt9T1fgD
47+
OYtmJ6VH53iLkJ8fMQZWS68Ad0444opgdoGVVoRqrL7F+ppYbAbHfTs1SDnph/MqqVtjdekmftYb
48+
oYTrCovcaeVjHWkDIz0EjH2OJw3/WoKxujdUkP5C5QOT5fyYB5efvNB4YqSJy2vTIpgKgvt1hH3R
49+
CNWiNVYcD2xMkSXzuEnnNW8gOAR/AAAA//8DANYbuh/uAQAA
50+
headers:
51+
CF-Cache-Status:
52+
- DYNAMIC
53+
CF-RAY:
54+
- 8c1aba4488fdd035-SJC
55+
Connection:
56+
- keep-alive
57+
Content-Encoding:
58+
- gzip
59+
Content-Type:
60+
- application/json
61+
Date:
62+
- Wed, 11 Sep 2024 21:25:00 GMT
63+
Server:
64+
- cloudflare
65+
Transfer-Encoding:
66+
- chunked
67+
X-Content-Type-Options:
68+
- nosniff
69+
access-control-expose-headers:
70+
- X-Request-ID
71+
alt-svc:
72+
- h3=":443"; ma=86400
73+
openai-organization:
74+
- future-house-xr4tdh
75+
openai-processing-ms:
76+
- "1891"
77+
openai-version:
78+
- "2020-10-01"
79+
strict-transport-security:
80+
- max-age=15552000; includeSubDomains; preload
81+
x-ratelimit-limit-requests:
82+
- "10000"
83+
x-ratelimit-limit-tokens:
84+
- "2000000"
85+
x-ratelimit-remaining-requests:
86+
- "9999"
87+
x-ratelimit-remaining-tokens:
88+
- "1999203"
89+
x-ratelimit-reset-requests:
90+
- 6ms
91+
x-ratelimit-reset-tokens:
92+
- 23ms
93+
x-request-id:
94+
- req_70379d0b10dbfd23826f5319eb7c48f4
95+
status:
96+
code: 200
97+
message: OK
98+
version: 1
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
interactions:
2+
- request:
3+
body:
4+
'{"messages": [{"role": "user", "content": [{"type": "image_url", "image_url":
5+
{"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR4nO3NMQEAAAjDMMC/ZzDBvlRA01vZJvwHAAAAAAAAAAAAbx2jxAE/i2AjOgAAAABJRU5ErkJggg=="}},
6+
{"type": "text", "text": "What color is this square? Respond only with the color
7+
name."}]}], "model": "gpt-4o-mini-2024-07-18"}'
8+
headers:
9+
accept:
10+
- application/json
11+
accept-encoding:
12+
- gzip, deflate
13+
connection:
14+
- keep-alive
15+
content-length:
16+
- "373"
17+
content-type:
18+
- application/json
19+
host:
20+
- api.openai.com
21+
user-agent:
22+
- AsyncOpenAI/Python 1.44.1
23+
x-stainless-arch:
24+
- arm64
25+
x-stainless-async:
26+
- async:asyncio
27+
x-stainless-lang:
28+
- python
29+
x-stainless-os:
30+
- MacOS
31+
x-stainless-package-version:
32+
- 1.44.1
33+
x-stainless-raw-response:
34+
- "true"
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: !!binary |
44+
H4sIAAAAAAAAA1SQP2/CMBTE93wKyzOpkjRAyNaBpVNF/wytqshxXoKL7WfZD9QK8d0rhxTK4uF+
45+
vvOdjwljXHW8ZlxuBUnjdPqweFoKef+46iQ9Z6+bl3YXDsq9rQ/v+ZrPogPbL5D057qTaJwGUmjP
46+
WHoQBDE1XxaLrFpVq2oEBjvQ0TY4SktMjbIqLbKiTLNlmleTe4tKQuA1+0gYY+w4nrGn7eCb1yyb
47+
/SkGQhAD8PpyiTHuUUeFixBUIGGJz65QoiWwY/UNdP+Jh34fRGxn91pP+unylMbBeWzDxC96r6wK
48+
28aDCGhjbCB0fKSnhLHPcdL+piV3Ho2jhnAHNgZW82LaxK9fecX5xAhJ6BtXnkwVefgJBKbplR3A
49+
O6/OE3vXzEso+rIqW+DJKfkFAAD//wMAfqvd//ABAAA=
50+
headers:
51+
CF-Cache-Status:
52+
- DYNAMIC
53+
CF-RAY:
54+
- 8c1aba436f88aaa6-SJC
55+
Connection:
56+
- keep-alive
57+
Content-Encoding:
58+
- gzip
59+
Content-Type:
60+
- application/json
61+
Date:
62+
- Wed, 11 Sep 2024 21:24:58 GMT
63+
Server:
64+
- cloudflare
65+
Transfer-Encoding:
66+
- chunked
67+
X-Content-Type-Options:
68+
- nosniff
69+
access-control-expose-headers:
70+
- X-Request-ID
71+
alt-svc:
72+
- h3=":443"; ma=86400
73+
openai-organization:
74+
- future-house-xr4tdh
75+
openai-processing-ms:
76+
- "895"
77+
openai-version:
78+
- "2020-10-01"
79+
strict-transport-security:
80+
- max-age=15552000; includeSubDomains; preload
81+
x-ratelimit-limit-requests:
82+
- "30000"
83+
x-ratelimit-limit-tokens:
84+
- "150000000"
85+
x-ratelimit-remaining-requests:
86+
- "29999"
87+
x-ratelimit-remaining-tokens:
88+
- "149999202"
89+
x-ratelimit-reset-requests:
90+
- 2ms
91+
x-ratelimit-reset-tokens:
92+
- 0s
93+
x-request-id:
94+
- req_93eab71f1f2d07d3a7cb0fbe4fe21df1
95+
status:
96+
code: 200
97+
message: OK
98+
version: 1

0 commit comments

Comments
 (0)