Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper tests for generation, refs #9
- Loading branch information
Showing
8 changed files
with
220 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
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
81 changes: 81 additions & 0 deletions
81
tests/cassettes/test_query_assistant/test_database_assistant_page.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,81 @@ | ||
interactions: | ||
- request: | ||
body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "The table | ||
schema is:\nCREATE TABLE foo (id integer primary key, name text)"}, {"role": | ||
"assistant", "content": "Ask questions to generate SQL"}, {"role": "user", "content": | ||
"How many rows in the sqlite_master table?"}, {"role": "assistant", "content": | ||
"select count(*) from sqlite_master\n-- Count rows in the sqlite_master table"}, | ||
{"role": "user", "content": "Show me all the data in the foo table"}, {"role": | ||
"assistant", "content": "select"}], "model": "claude-3-haiku-20240307", "system": | ||
"You answer questions by generating SQL queries using SQLite schema syntax.\nAlways | ||
start with -- SQL comments explaining what you are about to do.\nNo yapping. | ||
Output SQL with extensive SQL comments and nothing else.\nOr output SQL in a | ||
sql tagged fenced markdown code block.\nReturn only one SQL SELECT query."}' | ||
headers: | ||
accept: | ||
- application/json | ||
accept-encoding: | ||
- gzip, deflate | ||
anthropic-version: | ||
- '2023-06-01' | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- '870' | ||
content-type: | ||
- application/json | ||
host: | ||
- api.anthropic.com | ||
user-agent: | ||
- AsyncAnthropic/Python 0.25.2 | ||
x-stainless-arch: | ||
- arm64 | ||
x-stainless-async: | ||
- async:asyncio | ||
x-stainless-lang: | ||
- python | ||
x-stainless-os: | ||
- MacOS | ||
x-stainless-package-version: | ||
- 0.25.2 | ||
x-stainless-runtime: | ||
- CPython | ||
x-stainless-runtime-version: | ||
- 3.10.10 | ||
method: POST | ||
uri: https://api.anthropic.com/v1/messages | ||
response: | ||
body: | ||
string: !!binary | | ||
H4sIAAAAAAAAA1SOy2rDMBBFf0XcZZHBiRMC+oFCyMJtdn1gVHucOJZHrjQiDcb/Xpy2i64uHA6X | ||
M6FrYDDEU5Wvytvh8akI27a87i/l3j6/8PHQQ0NuIy0WxWhPBI3g3QJsjF0UywKNwTfkYFA7mxrK | ||
iuxsuz5l63y9yYt8B40ofqwifSbimmA4OaeR7o9mQsdjkkp8TxxhVputhk/yj+1mjdqzEAvM6/SX | ||
JfS1BNzHQD2oNvhBtd6/cZapIzmqRVnnVPDXqCw3qvYuDRx/RDnTIiuxH44wv/+GBrLRMwyIm0pS | ||
YMzfAAAA//8DANhA6bQtAQAA | ||
headers: | ||
CF-Cache-Status: | ||
- DYNAMIC | ||
CF-RAY: | ||
- 875704994c7a67f9-SJC | ||
Connection: | ||
- keep-alive | ||
Content-Encoding: | ||
- gzip | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Tue, 16 Apr 2024 20:45:15 GMT | ||
Server: | ||
- cloudflare | ||
Transfer-Encoding: | ||
- chunked | ||
request-id: | ||
- req_01KDY28fjzAA9d615XULxyjW | ||
via: | ||
- 1.1 google | ||
x-cloud-trace-context: | ||
- c5f2822f3aa36f6cc77d4241a215077a | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
81 changes: 81 additions & 0 deletions
81
tests/cassettes/test_query_assistant/test_table_assistant_page.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,81 @@ | ||
interactions: | ||
- request: | ||
body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "The table | ||
schema is:\nCREATE TABLE foo (id integer primary key, name text)"}, {"role": | ||
"assistant", "content": "Ask questions to generate SQL"}, {"role": "user", "content": | ||
"How many rows in the sqlite_master table?"}, {"role": "assistant", "content": | ||
"select count(*) from sqlite_master\n-- Count rows in the sqlite_master table"}, | ||
{"role": "user", "content": "Count of rows in foo"}, {"role": "assistant", "content": | ||
"select"}], "model": "claude-3-haiku-20240307", "system": "You answer questions | ||
by generating SQL queries using SQLite schema syntax.\nAlways start with -- | ||
SQL comments explaining what you are about to do.\nNo yapping. Output SQL with | ||
extensive SQL comments and nothing else.\nOr output SQL in a sql tagged fenced | ||
markdown code block.\nReturn only one SQL SELECT query."}' | ||
headers: | ||
accept: | ||
- application/json | ||
accept-encoding: | ||
- gzip, deflate | ||
anthropic-version: | ||
- '2023-06-01' | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- '853' | ||
content-type: | ||
- application/json | ||
host: | ||
- api.anthropic.com | ||
user-agent: | ||
- AsyncAnthropic/Python 0.25.2 | ||
x-stainless-arch: | ||
- arm64 | ||
x-stainless-async: | ||
- async:asyncio | ||
x-stainless-lang: | ||
- python | ||
x-stainless-os: | ||
- MacOS | ||
x-stainless-package-version: | ||
- 0.25.2 | ||
x-stainless-runtime: | ||
- CPython | ||
x-stainless-runtime-version: | ||
- 3.10.10 | ||
method: POST | ||
uri: https://api.anthropic.com/v1/messages | ||
response: | ||
body: | ||
string: !!binary | | ||
H4sIAAAAAAAAA0zOQUvDQBCG4b+yfJeqbCBNiqV7VURQBA8eikrYJpM2NJlps7O2EvLfJUXB08DD | ||
8PEOaCo4dGFbpPP7F6rWt8vHB34+n5669XH19Za/wkK/DzR9UQh+S7DopZ3Ah9AE9ayw6KSiFg5l | ||
62NFSZ7sfLOPSZZmizRPl7AIKoci0DESlwTHsW0t4mXRDWj4ELVQ2RMHuPlibiFR/1uWjxalsBIr | ||
3Pvwl6V0ngIux8GUElmvbq5N3UtnahHzwUli7iY2uiPDsdtQb6Q2vZyCafiis1pkZtRvWsL4+Vvb | ||
kw/CcCCuCo09Y/wBAAD//wMAeHTZSzIBAAA= | ||
headers: | ||
CF-Cache-Status: | ||
- DYNAMIC | ||
CF-RAY: | ||
- 8757049e484f5c22-SJC | ||
Connection: | ||
- keep-alive | ||
Content-Encoding: | ||
- gzip | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Tue, 16 Apr 2024 20:45:16 GMT | ||
Server: | ||
- cloudflare | ||
Transfer-Encoding: | ||
- chunked | ||
request-id: | ||
- req_01LtBxUFphUrt3NNjHgF6Pfm | ||
via: | ||
- 1.1 google | ||
x-cloud-trace-context: | ||
- 49ebe16a8310eedc8eea83e3dd710db8 | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
This file was deleted.
Oops, something went wrong.
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