-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ebd8556
commit 3638ab6
Showing
6 changed files
with
289 additions
and
4 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
226 changes: 226 additions & 0 deletions
226
...telemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_astreaming_cohere.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,226 @@ | ||
interactions: | ||
- request: | ||
body: '{"message": "tell me a short joke", "stream": true, "model": "command-r", | ||
"chat_history": [{"role": "System", "message": "You are a helpful assistant"}]}' | ||
headers: | ||
accept: | ||
- '*/*' | ||
accept-encoding: | ||
- gzip, deflate | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- '153' | ||
content-type: | ||
- application/json | ||
host: | ||
- api.cohere.com | ||
user-agent: | ||
- python-httpx/0.27.0 | ||
x-client-name: | ||
- langchain:partner | ||
x-fern-language: | ||
- Python | ||
x-fern-sdk-name: | ||
- cohere | ||
x-fern-sdk-version: | ||
- 5.5.3 | ||
method: POST | ||
uri: https://api.cohere.com/v1/chat | ||
response: | ||
body: | ||
string: '{"is_finished":false,"event_type":"stream-start","generation_id":"557b9052-655e-45fb-84ca-3a68f239743c"} | ||
{"is_finished":false,"event_type":"text-generation","text":"What"} | ||
{"is_finished":false,"event_type":"text-generation","text":" do"} | ||
{"is_finished":false,"event_type":"text-generation","text":" you"} | ||
{"is_finished":false,"event_type":"text-generation","text":" call"} | ||
{"is_finished":false,"event_type":"text-generation","text":" a"} | ||
{"is_finished":false,"event_type":"text-generation","text":" factory"} | ||
{"is_finished":false,"event_type":"text-generation","text":" that"} | ||
{"is_finished":false,"event_type":"text-generation","text":" makes"} | ||
{"is_finished":false,"event_type":"text-generation","text":" distinctly"} | ||
{"is_finished":false,"event_type":"text-generation","text":" average"} | ||
{"is_finished":false,"event_type":"text-generation","text":" products"} | ||
{"is_finished":false,"event_type":"text-generation","text":"?"} | ||
{"is_finished":false,"event_type":"text-generation","text":"\n\n*"} | ||
{"is_finished":false,"event_type":"text-generation","text":"An"} | ||
{"is_finished":false,"event_type":"text-generation","text":" adequate"} | ||
{"is_finished":false,"event_type":"text-generation","text":"-"} | ||
{"is_finished":false,"event_type":"text-generation","text":"ory"} | ||
{"is_finished":false,"event_type":"text-generation","text":".*"} | ||
{"is_finished":true,"event_type":"stream-end","response":{"response_id":"ceb726f9-d4f0-47d9-9da6-3ed43bea7626","text":"What | ||
do you call a factory that makes distinctly average products?\n\n*An adequate-ory.*","generation_id":"557b9052-655e-45fb-84ca-3a68f239743c","chat_history":[{"role":"SYSTEM","message":"You | ||
are a helpful assistant"},{"role":"USER","message":"tell me a short joke"},{"role":"CHATBOT","message":"What | ||
do you call a factory that makes distinctly average products?\n\n*An adequate-ory.*"}],"finish_reason":"COMPLETE","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":10,"output_tokens":20},"tokens":{"input_tokens":79,"output_tokens":20}}},"finish_reason":"COMPLETE"} | ||
' | ||
headers: | ||
Alt-Svc: | ||
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 | ||
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/stream+json | ||
date: | ||
- Tue, 28 May 2024 10:39:50 GMT | ||
expires: | ||
- Thu, 01 Jan 1970 00:00:00 UTC | ||
pragma: | ||
- no-cache | ||
server: | ||
- envoy | ||
transfer-encoding: | ||
- chunked | ||
vary: | ||
- Origin | ||
x-accel-expires: | ||
- '0' | ||
x-debug-trace-id: | ||
- c95431b8259da9152fffc219652c20a7 | ||
x-endpoint-monthly-call-limit: | ||
- '1000' | ||
x-envoy-upstream-service-time: | ||
- '114' | ||
x-trial-endpoint-call-limit: | ||
- '10' | ||
x-trial-endpoint-call-remaining: | ||
- '9' | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: '{"message": "tell me a short joke", "stream": true, "model": "command-r", | ||
"chat_history": [{"role": "System", "message": "You are a helpful assistant"}]}' | ||
headers: | ||
accept: | ||
- '*/*' | ||
accept-encoding: | ||
- gzip, deflate | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- '153' | ||
content-type: | ||
- application/json | ||
host: | ||
- api.cohere.com | ||
user-agent: | ||
- python-httpx/0.27.0 | ||
x-client-name: | ||
- langchain:partner | ||
x-fern-language: | ||
- Python | ||
x-fern-sdk-name: | ||
- cohere | ||
x-fern-sdk-version: | ||
- 5.5.3 | ||
method: POST | ||
uri: https://api.cohere.com/v1/chat | ||
response: | ||
body: | ||
string: '{"is_finished":false,"event_type":"stream-start","generation_id":"df614ed1-b758-43a7-b130-a204c2e090e2"} | ||
{"is_finished":false,"event_type":"text-generation","text":"What"} | ||
{"is_finished":false,"event_type":"text-generation","text":" do"} | ||
{"is_finished":false,"event_type":"text-generation","text":" you"} | ||
{"is_finished":false,"event_type":"text-generation","text":" call"} | ||
{"is_finished":false,"event_type":"text-generation","text":" a"} | ||
{"is_finished":false,"event_type":"text-generation","text":" factory"} | ||
{"is_finished":false,"event_type":"text-generation","text":" that"} | ||
{"is_finished":false,"event_type":"text-generation","text":" makes"} | ||
{"is_finished":false,"event_type":"text-generation","text":" distinctly"} | ||
{"is_finished":false,"event_type":"text-generation","text":" average"} | ||
{"is_finished":false,"event_type":"text-generation","text":" products"} | ||
{"is_finished":false,"event_type":"text-generation","text":"?"} | ||
{"is_finished":false,"event_type":"text-generation","text":"\n\n*"} | ||
{"is_finished":false,"event_type":"text-generation","text":"An"} | ||
{"is_finished":false,"event_type":"text-generation","text":" adequate"} | ||
{"is_finished":false,"event_type":"text-generation","text":"-"} | ||
{"is_finished":false,"event_type":"text-generation","text":"ory"} | ||
{"is_finished":false,"event_type":"text-generation","text":".*"} | ||
{"is_finished":true,"event_type":"stream-end","response":{"response_id":"e15d0b71-6679-49a0-9e81-bacdbfac77b3","text":"What | ||
do you call a factory that makes distinctly average products?\n\n*An adequate-ory.*","generation_id":"df614ed1-b758-43a7-b130-a204c2e090e2","chat_history":[{"role":"SYSTEM","message":"You | ||
are a helpful assistant"},{"role":"USER","message":"tell me a short joke"},{"role":"CHATBOT","message":"What | ||
do you call a factory that makes distinctly average products?\n\n*An adequate-ory.*"}],"finish_reason":"COMPLETE","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":10,"output_tokens":20},"tokens":{"input_tokens":79,"output_tokens":20}}},"finish_reason":"COMPLETE"} | ||
' | ||
headers: | ||
Alt-Svc: | ||
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 | ||
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/stream+json | ||
date: | ||
- Tue, 28 May 2024 10:39:51 GMT | ||
expires: | ||
- Thu, 01 Jan 1970 00:00:00 UTC | ||
pragma: | ||
- no-cache | ||
server: | ||
- envoy | ||
transfer-encoding: | ||
- chunked | ||
vary: | ||
- Origin | ||
x-accel-expires: | ||
- '0' | ||
x-debug-trace-id: | ||
- 21dd35baf56070c149ad90741a0ad935 | ||
x-endpoint-monthly-call-limit: | ||
- '1000' | ||
x-envoy-upstream-service-time: | ||
- '92' | ||
x-trial-endpoint-call-limit: | ||
- '10' | ||
x-trial-endpoint-call-remaining: | ||
- '8' | ||
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