Skip to content

Commit

Permalink
update tests for latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Verhoog committed Feb 11, 2025
1 parent 966de58 commit 948a7bf
Show file tree
Hide file tree
Showing 28 changed files with 538 additions and 367 deletions.
4 changes: 1 addition & 3 deletions riotfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2534,6 +2534,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT
name="langchain",
command="pytest -v {cmdargs} tests/contrib/langchain",
pkgs={
"vcrpy": "==7.0.0",
"pytest-asyncio": "==0.23.7",
"tiktoken": latest,
"huggingface-hub": latest,
Expand All @@ -2548,7 +2549,6 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT
venvs=[
Venv(
pkgs={
"vcrpy": "==5.1.0",
"langchain": "==0.1.20",
"langchain-community": "==0.0.38",
"langchain-core": "==0.1.52",
Expand All @@ -2569,7 +2569,6 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT
),
Venv(
pkgs={
"vcrpy": "==5.1.0",
"langchain": "==0.2.0",
"langchain-core": "==0.2.0",
"langchain-openai": latest,
Expand All @@ -2588,7 +2587,6 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT
),
Venv(
pkgs={
"vcrpy": "==5.1.0",
"langchain": latest,
"langchain-community": latest,
"langchain-core": latest,
Expand Down
93 changes: 0 additions & 93 deletions tests/contrib/langchain/cassettes/cohere_completion_sync.yaml

This file was deleted.

85 changes: 85 additions & 0 deletions tests/contrib/langchain/cassettes/cohere_completion_sync_0_2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
interactions:
- request:
body: '{"prompt": "What is the secret Krabby Patty recipe?", "model": null, "stop_sequences":
null, "stream": false}'
headers:
accept:
- '*/*'
accept-encoding:
- gzip, deflate
connection:
- keep-alive
content-length:
- '109'
content-type:
- application/json
host:
- api.cohere.com
user-agent:
- python-httpx/0.27.2
x-client-name:
- langchain:partner
x-fern-language:
- Python
x-fern-sdk-name:
- cohere
x-fern-sdk-version:
- 5.13.11
method: POST
uri: https://api.cohere.com/v1/generate
response:
body:
string: '{"id":"f15260ab-8bdf-4d3c-9d93-9f272736573c","generations":[{"id":"17be474b-3080-48f5-98f1-59a182419eb3","text":"
The secret Krabby Patty recipe has been kept hidden throughout all the Spongebob
Squarepants episodes and movies, and it is not disclosed in any official media.
Nevertheless, fans have come up with their own speculations on what the recipe
might contain. One popular theory suggests that the recipe includes seaweed,
cheddar, crab, vegetables, and a secret sauce. \n\nIt''s important to note
that the secret Krabby Patty recipe is fictional and solely exists within
the Spongebob Squarepants universe. ","finish_reason":"COMPLETE"}],"prompt":"What
is the secret Krabby Patty recipe?","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":10,"output_tokens":101}}}'
headers:
Alt-Svc:
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Length:
- '791'
Via:
- 1.1 google
access-control-expose-headers:
- X-Debug-Trace-ID
cache-control:
- no-cache, no-store, no-transform, must-revalidate, private, max-age=0
content-type:
- application/json
date:
- Tue, 11 Feb 2025 18:57:40 GMT
expires:
- Thu, 01 Jan 1970 00:00:00 UTC
num_chars:
- '539'
num_tokens:
- '111'
pragma:
- no-cache
server:
- envoy
vary:
- Origin
x-accel-expires:
- '0'
x-api-warning:
- 'unknown field: parameter model is not a valid field'
x-debug-trace-id:
- b03ef8103599fe9b74524248d2befdec
x-endpoint-monthly-call-limit:
- '1000'
x-envoy-upstream-service-time:
- '2952'
x-trial-endpoint-call-limit:
- '40'
x-trial-endpoint-call-remaining:
- '39'
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
interactions:
- request:
body: ''
headers:
accept:
- '*/*'
accept-encoding:
- gzip, deflate, zstd
connection:
- keep-alive
host:
- api.cohere.com
user-agent:
- python-httpx/0.27.2
x-client-name:
- langchain:partner
x-fern-language:
- Python
x-fern-sdk-name:
- cohere
x-fern-sdk-version:
- 5.13.11
method: GET
uri: https://api.cohere.com/v1/models?endpoint=chat&default_only=true
response:
body:
string: '{"models":[{"name":"command-r-plus-08-2024","endpoints":["generate","chat","summarize"],"finetuned":false,"context_length":128000,"tokenizer_url":"https://storage.googleapis.com/cohere-public/tokenizers/command-r-plus-08-2024.json","default_endpoints":["chat"]}]}'
headers:
Alt-Svc:
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Length:
- '263'
Via:
- 1.1 google
access-control-expose-headers:
- X-Debug-Trace-ID
cache-control:
- no-cache, no-store, no-transform, must-revalidate, private, max-age=0
content-type:
- application/json
date:
- Tue, 11 Feb 2025 19:05:02 GMT
expires:
- Thu, 01 Jan 1970 00:00:00 UTC
pragma:
- no-cache
server:
- envoy
vary:
- Origin
x-accel-expires:
- '0'
x-debug-trace-id:
- 11b0ae78dffcb9678f2f78f21b411310
x-endpoint-monthly-call-limit:
- '1000'
x-envoy-upstream-service-time:
- '24'
x-trial-endpoint-call-limit:
- '40'
x-trial-endpoint-call-remaining:
- '39'
status:
code: 200
message: OK
version: 1
Loading

0 comments on commit 948a7bf

Please sign in to comment.