langtrace-python-sdk 2.1.28__py3-none-any.whl → 2.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- examples/cohere_example/chat.py +1 -0
- examples/cohere_example/chat_stream.py +3 -0
- examples/gemini_example/__init__.py +6 -0
- examples/gemini_example/function_tools.py +62 -0
- examples/gemini_example/main.py +91 -0
- examples/langchain_example/__init__.py +8 -0
- examples/langchain_example/groq_example.py +28 -15
- examples/ollama_example/basic.py +1 -0
- examples/openai_example/__init__.py +1 -0
- examples/openai_example/async_tool_calling_nonstreaming.py +1 -1
- examples/openai_example/chat_completion.py +1 -1
- examples/openai_example/embeddings_create.py +1 -0
- examples/openai_example/images_edit.py +2 -2
- examples/vertexai_example/__init__.py +6 -0
- examples/vertexai_example/main.py +214 -0
- langtrace_python_sdk/constants/instrumentation/common.py +2 -0
- langtrace_python_sdk/constants/instrumentation/gemini.py +12 -0
- langtrace_python_sdk/constants/instrumentation/vertexai.py +42 -0
- langtrace_python_sdk/instrumentation/__init__.py +4 -0
- langtrace_python_sdk/instrumentation/anthropic/patch.py +68 -96
- langtrace_python_sdk/instrumentation/chroma/patch.py +29 -29
- langtrace_python_sdk/instrumentation/cohere/patch.py +143 -242
- langtrace_python_sdk/instrumentation/gemini/__init__.py +3 -0
- langtrace_python_sdk/instrumentation/gemini/instrumentation.py +36 -0
- langtrace_python_sdk/instrumentation/gemini/patch.py +186 -0
- langtrace_python_sdk/instrumentation/groq/patch.py +82 -125
- langtrace_python_sdk/instrumentation/ollama/patch.py +62 -65
- langtrace_python_sdk/instrumentation/openai/patch.py +190 -494
- langtrace_python_sdk/instrumentation/qdrant/patch.py +6 -6
- langtrace_python_sdk/instrumentation/vertexai/__init__.py +3 -0
- langtrace_python_sdk/instrumentation/vertexai/instrumentation.py +33 -0
- langtrace_python_sdk/instrumentation/vertexai/patch.py +131 -0
- langtrace_python_sdk/langtrace.py +7 -1
- langtrace_python_sdk/utils/__init__.py +14 -3
- langtrace_python_sdk/utils/llm.py +311 -6
- langtrace_python_sdk/version.py +1 -1
- {langtrace_python_sdk-2.1.28.dist-info → langtrace_python_sdk-2.2.1.dist-info}/METADATA +26 -19
- {langtrace_python_sdk-2.1.28.dist-info → langtrace_python_sdk-2.2.1.dist-info}/RECORD +55 -36
- tests/anthropic/test_anthropic.py +28 -27
- tests/cohere/test_cohere_chat.py +36 -36
- tests/cohere/test_cohere_embed.py +12 -9
- tests/cohere/test_cohere_rerank.py +18 -11
- tests/groq/cassettes/test_async_chat_completion.yaml +113 -0
- tests/groq/cassettes/test_async_chat_completion_streaming.yaml +2232 -0
- tests/groq/cassettes/test_chat_completion.yaml +114 -0
- tests/groq/cassettes/test_chat_completion_streaming.yaml +2512 -0
- tests/groq/conftest.py +33 -0
- tests/groq/test_groq.py +142 -0
- tests/openai/cassettes/test_async_chat_completion_streaming.yaml +28 -28
- tests/openai/test_chat_completion.py +53 -67
- tests/openai/test_image_generation.py +47 -24
- tests/utils.py +40 -5
- {langtrace_python_sdk-2.1.28.dist-info → langtrace_python_sdk-2.2.1.dist-info}/WHEEL +0 -0
- {langtrace_python_sdk-2.1.28.dist-info → langtrace_python_sdk-2.2.1.dist-info}/entry_points.txt +0 -0
- {langtrace_python_sdk-2.1.28.dist-info → langtrace_python_sdk-2.2.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
interactions:
|
|
2
|
+
- request:
|
|
3
|
+
body: '{"messages": [{"role": "user", "content": "Explain the importance of low
|
|
4
|
+
latency LLMs"}], "model": "llama3-8b-8192"}'
|
|
5
|
+
headers:
|
|
6
|
+
accept:
|
|
7
|
+
- application/json
|
|
8
|
+
accept-encoding:
|
|
9
|
+
- gzip, deflate
|
|
10
|
+
connection:
|
|
11
|
+
- keep-alive
|
|
12
|
+
content-length:
|
|
13
|
+
- '116'
|
|
14
|
+
content-type:
|
|
15
|
+
- application/json
|
|
16
|
+
host:
|
|
17
|
+
- api.groq.com
|
|
18
|
+
user-agent:
|
|
19
|
+
- AsyncGroq/Python 0.9.0
|
|
20
|
+
x-stainless-arch:
|
|
21
|
+
- arm64
|
|
22
|
+
x-stainless-async:
|
|
23
|
+
- async:asyncio
|
|
24
|
+
x-stainless-lang:
|
|
25
|
+
- python
|
|
26
|
+
x-stainless-os:
|
|
27
|
+
- MacOS
|
|
28
|
+
x-stainless-package-version:
|
|
29
|
+
- 0.9.0
|
|
30
|
+
x-stainless-runtime:
|
|
31
|
+
- CPython
|
|
32
|
+
x-stainless-runtime-version:
|
|
33
|
+
- 3.11.5
|
|
34
|
+
method: POST
|
|
35
|
+
uri: https://api.groq.com/openai/v1/chat/completions
|
|
36
|
+
response:
|
|
37
|
+
body:
|
|
38
|
+
string: !!binary |
|
|
39
|
+
H4sIAAAAAAAAA7xXwW4jNwy99yuIObWLsWEndhz7tii6aIBsD+0WPdRFQGs4Hm400kSUnMwu8u8F
|
|
40
|
+
NbbjZJO2p15tUeJ7fHzkfC24KlaFaTCatrOjCs9n1flyM1pO0Ixmy7PlaLO8MKPFcjqbzBZkEOdF
|
|
41
|
+
WfjNZzJxHzg2vu0sRfauKAsTCCNVxWq6mC6X88lkelEWra/IFqvCWmzxfHS5GV1Ol2d6uvFsSIrV
|
|
42
|
+
n18LdhU9FKtJWbQkglsqVl+L4C0VqwJFWCK6qDHeRXL6+rW/H1mM5EwP1xi2BNfotgm3BB/1RYHv
|
|
43
|
+
r68/yg+AgYBEyEVGC7UPsMPAPglg11k2qMkLxAYjBLpLHAgCdlwBugqortkwuQhd8IZE2G3B1+Aw
|
|
44
|
+
poAW7OHRCiOO4WcKlF8U3xIEQtG775se7Gm+1x8ln+K280GhrdZu7aZjePfuV0I7itzS09VPL797
|
|
45
|
+
t4LrlxeRw43Nj70dWMJ9w6YBFjAhmQMTzxiwfHsSGwM6sfmvEjJ7rbKADm0vLGVmJ9JDBElti4G/
|
|
46
|
+
5LNj+INjo2hhn2QJSSgIGHQQyBDv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WbkVy9DjTKcoGi86RmyfFxQH
|
|
59
|
+
YgKRNgJWGqprj0J8Nr42vTrYjtWOs70cJO2P5TidTeO1m04U14ekGh11wft6P2zeC7y/GoLRNHkg
|
|
60
|
+
EobcYqotdolUXLTzdvfadLlna6Gz2AMeNxTd/9Qgcwn0piEvVbI6wKm6noj46aGzyMNK9P6qhF/2
|
|
61
|
+
JTtuh787JSSiG4aQpvxR5TGo40PSsTLWdezK7Vebvnx9e/vftspPaka+rimASy0FfWZDjmrWKrIz
|
|
62
|
+
NuUS8htDMJ95YRfl3rRP3PR0CWth0OOxm5OrMqahBdH18P5qlF3wxMwGizh17eKxLKzfdsFvpFi5
|
|
63
|
+
ZG1Z1OxYmpthOy5WhUTfFY9/lUU6bP5d8G0Xb6K/JSfF6mxSHn/ilorVZDyZnC8up4vLS/0mOHyC
|
|
64
|
+
HAPm8/nz3/dRs9n5xXx5eX5WFtFHtE8Bi/nxp+PZxWw2vTh7LAvpJVJ7o1qn0AXOHyB1d4P1ZD6f
|
|
65
|
+
Lwzq58zDzTb4O80+f1YFuruZTD9P43b2pQ31ZS2bare766eb+iGG4vHxu78BAAD//wMAo40234AN
|
|
66
|
+
AAA=
|
|
67
|
+
headers:
|
|
68
|
+
CF-Cache-Status:
|
|
69
|
+
- DYNAMIC
|
|
70
|
+
CF-RAY:
|
|
71
|
+
- 89d12ed05998077f-MRS
|
|
72
|
+
Cache-Control:
|
|
73
|
+
- private, max-age=0, no-store, no-cache, must-revalidate
|
|
74
|
+
Connection:
|
|
75
|
+
- keep-alive
|
|
76
|
+
Content-Encoding:
|
|
77
|
+
- gzip
|
|
78
|
+
Content-Type:
|
|
79
|
+
- application/json
|
|
80
|
+
Date:
|
|
81
|
+
- Tue, 02 Jul 2024 19:53:36 GMT
|
|
82
|
+
Server:
|
|
83
|
+
- cloudflare
|
|
84
|
+
Set-Cookie:
|
|
85
|
+
- __cf_bm=kwAg3.4AprJOv6O8EoGGz949TacWaWKQOH.h4WYt6rQ-1719950016-1.0.1.1-wr1oIH71tAeoJR4E4muLNPp2pxTLEccQzQSaalMzTRri_RMUSGy7IVTmulIABre9w2vpXFnWiodeNPwZzdQ_hQ;
|
|
86
|
+
path=/; expires=Tue, 02-Jul-24 20:23:36 GMT; domain=.groq.com; HttpOnly; Secure;
|
|
87
|
+
SameSite=None
|
|
88
|
+
Transfer-Encoding:
|
|
89
|
+
- chunked
|
|
90
|
+
alt-svc:
|
|
91
|
+
- h3=":443"; ma=86400
|
|
92
|
+
vary:
|
|
93
|
+
- Origin
|
|
94
|
+
via:
|
|
95
|
+
- 1.1 google
|
|
96
|
+
x-ratelimit-limit-requests:
|
|
97
|
+
- '14400'
|
|
98
|
+
x-ratelimit-limit-tokens:
|
|
99
|
+
- '30000'
|
|
100
|
+
x-ratelimit-remaining-requests:
|
|
101
|
+
- '14398'
|
|
102
|
+
x-ratelimit-remaining-tokens:
|
|
103
|
+
- '29642'
|
|
104
|
+
x-ratelimit-reset-requests:
|
|
105
|
+
- 10.974999999s
|
|
106
|
+
x-ratelimit-reset-tokens:
|
|
107
|
+
- 716ms
|
|
108
|
+
x-request-id:
|
|
109
|
+
- req_01j1tg4zmrf8fsbdvvqy1bfxtr
|
|
110
|
+
status:
|
|
111
|
+
code: 200
|
|
112
|
+
message: OK
|
|
113
|
+
version: 1
|