-
Notifications
You must be signed in to change notification settings - Fork 232
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
9103977
commit ebd8556
Showing
6 changed files
with
315 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
163 changes: 159 additions & 4 deletions
163
packages/opentelemetry-instrumentation-langchain/poetry.lock
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
116 changes: 116 additions & 0 deletions
116
...ntelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_streaming_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,116 @@ | ||
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":"8681736d-8a61-4220-b030-eadfe451f55c"} | ||
{"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":"tor"} | ||
{"is_finished":false,"event_type":"text-generation","text":"ium"} | ||
{"is_finished":false,"event_type":"text-generation","text":"*."} | ||
{"is_finished":true,"event_type":"stream-end","response":{"response_id":"00721a08-a2e4-451a-92ee-82a55bf43526","text":"What | ||
do you call a factory that makes distinctly average products?\n\n*An adequate-torium*.","generation_id":"8681736d-8a61-4220-b030-eadfe451f55c","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-torium*."}],"finish_reason":"COMPLETE","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":10,"output_tokens":21},"tokens":{"input_tokens":79,"output_tokens":21}}},"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 08:09:02 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: | ||
- 95bf12ce0cc85c5a248873cb342c8112 | ||
x-endpoint-monthly-call-limit: | ||
- '1000' | ||
x-envoy-upstream-service-time: | ||
- '75' | ||
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
Oops, something went wrong.