-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added mark vcr decorator to a bunch of tests, with fixtures
- Loading branch information
1 parent
6716bcc
commit 3a7eb05
Showing
25 changed files
with
2,612 additions
and
24 deletions.
There are no files selected for viewing
713 changes: 713 additions & 0 deletions
713
tests/cassettes/TestHTTPAgentClient.test_lifecycle.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
61 changes: 61 additions & 0 deletions
61
tests/cassettes/TestLLMModel.test_model[claude-3-haiku-20240307].yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
interactions: | ||
- request: | ||
body: | ||
'{"messages": [{"role": "user", "content": [{"type": "text", "text": "Hello, | ||
how are you?"}]}], "system": [{"type": "text", "text": "Respond with single | ||
words."}], "max_tokens": 4096, "model": "claude-3-haiku-20240307"}' | ||
headers: | ||
accept: | ||
- application/json | ||
accept-encoding: | ||
- gzip, deflate | ||
anthropic-version: | ||
- "2023-06-01" | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- "218" | ||
content-type: | ||
- application/json | ||
host: | ||
- api.anthropic.com | ||
user-agent: | ||
- litellm/1.44.24 | ||
method: POST | ||
uri: https://api.anthropic.com/v1/messages | ||
response: | ||
body: | ||
string: !!binary | | ||
H4sIAAAAAAAAA0yO22rDMBBE/2We5eLcCNFjSEJ+oDRQilHkxRaWV653BS3G/x4cWsjTwJkLMyHU | ||
sOilqcrVx/adxHetnC7j8dzce387XFsY6O9AS4pEXEMwGFNcgBMJoo4VBn2qKcLCR5drKjZF60KX | ||
i3W53pabcg8Dn1iJFfZz+l9U+lm6T7G4BKY3zF8GommoRnKSGBbEdaV5ZPwZQt+Z2BMs5xgN8vOV | ||
nRB4yFpp6ogFdnUwSFlf0W6eHwAAAP//AwBu9B8r8gAAAA== | ||
headers: | ||
CF-Cache-Status: | ||
- DYNAMIC | ||
CF-RAY: | ||
- 8c1adb64febe9800-SJC | ||
Connection: | ||
- keep-alive | ||
Content-Encoding: | ||
- gzip | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Wed, 11 Sep 2024 21:47:34 GMT | ||
Server: | ||
- cloudflare | ||
Transfer-Encoding: | ||
- chunked | ||
X-Robots-Tag: | ||
- none | ||
request-id: | ||
- req_013F7JJtkufBc3MGej2SFWxA | ||
via: | ||
- 1.1 google | ||
x-cloud-trace-context: | ||
- 5a7bd3586c4b8aa6cf7dc15b4a10a79e | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
96 changes: 96 additions & 0 deletions
96
tests/cassettes/TestLLMModel.test_model[gpt-3.5-turbo].yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
interactions: | ||
- request: | ||
body: | ||
'{"messages": [{"role": "system", "content": "Respond with single words."}, | ||
{"role": "user", "content": "Hello, how are you?"}], "model": "gpt-3.5-turbo"}' | ||
headers: | ||
accept: | ||
- application/json | ||
accept-encoding: | ||
- gzip, deflate | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- "153" | ||
content-type: | ||
- application/json | ||
host: | ||
- api.openai.com | ||
user-agent: | ||
- AsyncOpenAI/Python 1.44.1 | ||
x-stainless-arch: | ||
- arm64 | ||
x-stainless-async: | ||
- async:asyncio | ||
x-stainless-lang: | ||
- python | ||
x-stainless-os: | ||
- MacOS | ||
x-stainless-package-version: | ||
- 1.44.1 | ||
x-stainless-raw-response: | ||
- "true" | ||
x-stainless-runtime: | ||
- CPython | ||
x-stainless-runtime-version: | ||
- 3.12.5 | ||
method: POST | ||
uri: https://api.openai.com/v1/chat/completions | ||
response: | ||
body: | ||
string: !!binary | | ||
H4sIAAAAAAAAAwAAAP//VJBBawIxFITv+yvCO7virqzFvQkFD4W2UHtpKRKzzzWa5IXkLa2I/71k | ||
XbW95DBfZjKTUyYE6AZqAWonWVlv8sXsdbWSRdBvy8PyyM9zsh/0+LRf+O+XdxglB232qPjqGiuy | ||
3iBrchesAkrGlFo8lLPJvCirqgeWGjTJ1nrOp+Mq5y5sKJ8UZTU4d6QVRqjFZyaEEKf+TB1dgz9Q | ||
i8noqliMUbYI9e2SEBDIJAVkjDqydAyjO1TkGF1fe0nU/EUBt12UqZrrjBn08+0tQ60PtIkDv+lb | ||
7XTcrQPKSC7lRiYPPT1nQnz1m7p/NcEHsp7XTAd0KbAsL3Fw/8U7LAbGxNL88UyzoR7EY2S06612 | ||
LQYfdL+vH3HOfgEAAP//AwBMSqZg3gEAAA== | ||
headers: | ||
CF-Cache-Status: | ||
- DYNAMIC | ||
CF-RAY: | ||
- 8c1adb68dfeb966f-SJC | ||
Connection: | ||
- keep-alive | ||
Content-Encoding: | ||
- gzip | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Wed, 11 Sep 2024 21:47:35 GMT | ||
Server: | ||
- cloudflare | ||
Transfer-Encoding: | ||
- chunked | ||
X-Content-Type-Options: | ||
- nosniff | ||
access-control-expose-headers: | ||
- X-Request-ID | ||
alt-svc: | ||
- h3=":443"; ma=86400 | ||
openai-organization: | ||
- future-house-xr4tdh | ||
openai-processing-ms: | ||
- "94" | ||
openai-version: | ||
- "2020-10-01" | ||
strict-transport-security: | ||
- max-age=15552000; includeSubDomains; preload | ||
x-ratelimit-limit-requests: | ||
- "12000" | ||
x-ratelimit-limit-tokens: | ||
- "1000000" | ||
x-ratelimit-remaining-requests: | ||
- "11999" | ||
x-ratelimit-remaining-tokens: | ||
- "999969" | ||
x-ratelimit-reset-requests: | ||
- 5ms | ||
x-ratelimit-reset-tokens: | ||
- 1ms | ||
x-request-id: | ||
- req_59689a9a4b451bc51b25aa932438cde3 | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
interactions: | ||
- request: | ||
body: | ||
'{"messages": [{"role": "system", "content": "Respond following this JSON | ||
schema:\n\n{\n \"properties\": {\n \"name\": {\n \"title\": \"Name\",\n \"type\": | ||
\"string\"\n },\n \"age\": {\n \"title\": \"Age\",\n \"type\": | ||
\"integer\"\n }\n },\n \"required\": [\n \"name\",\n \"age\"\n ],\n \"title\": | ||
\"DummyOutputSchema\",\n \"type\": \"object\"\n}"}, {"role": "user", "content": | ||
"My name is Claude and I am 1 year old. What is my name and age?"}], "model": | ||
"gpt-3.5-turbo", "response_format": {"type": "json_object"}}' | ||
headers: | ||
accept: | ||
- application/json | ||
accept-encoding: | ||
- gzip, deflate | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- "559" | ||
content-type: | ||
- application/json | ||
host: | ||
- api.openai.com | ||
user-agent: | ||
- AsyncOpenAI/Python 1.44.1 | ||
x-stainless-arch: | ||
- arm64 | ||
x-stainless-async: | ||
- async:asyncio | ||
x-stainless-lang: | ||
- python | ||
x-stainless-os: | ||
- MacOS | ||
x-stainless-package-version: | ||
- 1.44.1 | ||
x-stainless-raw-response: | ||
- "true" | ||
x-stainless-runtime: | ||
- CPython | ||
x-stainless-runtime-version: | ||
- 3.12.5 | ||
method: POST | ||
uri: https://api.openai.com/v1/chat/completions | ||
response: | ||
body: | ||
string: !!binary | | ||
H4sIAAAAAAAAA1SQzW7CMBCE73mK1Z4TREghIbeqVXurekFV21TIJEswdWzLdgQI8e6VTfjpxYf5 | ||
POMZHyMA5A2WgPWGubrTInmcvRfZ4evjk78U+vU5e9i+LXb73aIxOcsx9g612lLtLq5RrTotyHEl | ||
z7g2xBz51DSfzMbFfD7JA+hUQ8LbWu2SbDRNXG9WKhmnk+ng3Chek8USviMAgGM4fUfZ0B5LGMcX | ||
pSNrWUtYXi8BoFHCK8is5dYx6TC+wVpJRzLUPlYSoELJOqqwhAqfBOsbqjA+A9YGPa3k6T7B0Lq3 | ||
zC+QvRCDfrpWEqrVRq3swK/6mktuN0tDzCrpn7dOaQz0FAH8hOn9vzWojeq0Wzr1S9IHpmlxzsPb | ||
b9/RfIBOOSbu9GwaDQ3RHqyjbrnmsiWjDQ8/EXacoj8AAAD//wMANu8s3AgCAAA= | ||
headers: | ||
CF-Cache-Status: | ||
- DYNAMIC | ||
CF-RAY: | ||
- 8c1abafcea3c171a-SJC | ||
Connection: | ||
- keep-alive | ||
Content-Encoding: | ||
- gzip | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Wed, 11 Sep 2024 21:25:27 GMT | ||
Server: | ||
- cloudflare | ||
Transfer-Encoding: | ||
- chunked | ||
X-Content-Type-Options: | ||
- nosniff | ||
access-control-expose-headers: | ||
- X-Request-ID | ||
alt-svc: | ||
- h3=":443"; ma=86400 | ||
openai-organization: | ||
- future-house-xr4tdh | ||
openai-processing-ms: | ||
- "267" | ||
openai-version: | ||
- "2020-10-01" | ||
strict-transport-security: | ||
- max-age=15552000; includeSubDomains; preload | ||
x-ratelimit-limit-requests: | ||
- "12000" | ||
x-ratelimit-limit-tokens: | ||
- "1000000" | ||
x-ratelimit-remaining-requests: | ||
- "11999" | ||
x-ratelimit-remaining-tokens: | ||
- "999838" | ||
x-ratelimit-reset-requests: | ||
- 5ms | ||
x-ratelimit-reset-tokens: | ||
- 9ms | ||
x-request-id: | ||
- req_65355d90c1cb42732d3c85abb2413f94 | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
62 changes: 62 additions & 0 deletions
62
tests/cassettes/TestLLMModel.test_text_image_message[claude-3-haiku-20240307].yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
interactions: | ||
- request: | ||
body: | ||
'{"messages": [{"role": "user", "content": [{"type": "image", "source": | ||
{"type": "base64", "media_type": "image/png", "data": "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR4nO3NMQEAAAjDMMC/ZzDBvlRA01vZJvwHAAAAAAAAAAAAbx2jxAE/i2AjOgAAAABJRU5ErkJggg=="}}, | ||
{"type": "text", "text": "What color is this square? Respond only with the color | ||
name."}]}], "max_tokens": 4096, "model": "claude-3-haiku-20240307"}' | ||
headers: | ||
accept: | ||
- application/json | ||
accept-encoding: | ||
- gzip, deflate | ||
anthropic-version: | ||
- "2023-06-01" | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- "411" | ||
content-type: | ||
- application/json | ||
host: | ||
- api.anthropic.com | ||
user-agent: | ||
- litellm/1.44.24 | ||
method: POST | ||
uri: https://api.anthropic.com/v1/messages | ||
response: | ||
body: | ||
string: !!binary | | ||
H4sIAAAAAAAAA0yOT2vCQBDFv8s7byBNBOlehV5KRUS9SAlLdqrBdTZmZool5LuXiIWeHvzeH96I | ||
LsLjKqemfNnFj3U4L982h9V2d/ve1/b+RQMc9KenOUUi4URwGHKaQRDpRAMrHK45UoJHm4JFKuri | ||
HLqLFVVZLcq6XMKhzazECn8c/xaV7nP3IR5bipg+HURz3wwUJDM8iGOjNjCehtDNiFuCZ0vJwR6f | ||
/IiOe9NG84VY4KtXh2z6Hy2m6RcAAP//AwB6WGlZ8AAAAA== | ||
headers: | ||
CF-Cache-Status: | ||
- DYNAMIC | ||
CF-RAY: | ||
- 8c1aba3c6c959664-SJC | ||
Connection: | ||
- keep-alive | ||
Content-Encoding: | ||
- gzip | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Wed, 11 Sep 2024 21:24:56 GMT | ||
Server: | ||
- cloudflare | ||
Transfer-Encoding: | ||
- chunked | ||
X-Robots-Tag: | ||
- none | ||
request-id: | ||
- req_01HzTrvjM4ny4Fa5TnY8n8pE | ||
via: | ||
- 1.1 google | ||
x-cloud-trace-context: | ||
- 4ab7e744703e1034c4b84f8d53549416 | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
Oops, something went wrong.