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,114 @@
|
|
|
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
|
+
- Groq/Python 0.9.0
|
|
20
|
+
x-stainless-arch:
|
|
21
|
+
- arm64
|
|
22
|
+
x-stainless-async:
|
|
23
|
+
- 'false'
|
|
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
|
+
H4sIAAAAAAAAA4xXTW/jRhK9768o8JQYlCBZsi3rFgQzSQBndvKBvawXRqlZJGvU7Ka7mtJoBv7v
|
|
40
|
+
QTVJWZY9mxzZ7GJXvXrvVfNrxkW2zkyN0TStnSyvLheFuSkmq9X1YrIszc1ks1iZSXG1uV7MFwZv
|
|
41
|
+
rzHLM7/5RCYOgVPjm9ZSZO+yPDOBMFKRrec389vbq9lsfpVnjS/IZuvMWmxwMVltJqv57aXurj0b
|
|
42
|
+
kmz9368Zu4I+Z+tZnjUkghVl669Z8JaydYYiLBFd1BjvIjk9/Q5DRXCHruqwIvhVTxH47u7uV/ke
|
|
43
|
+
LG8JYkAnpQ8NBYEadwSBdt52mix/oQJiTVAy2QJ8CQ5jF9CCHb/YBm9IhF0F3324+/g9bA5ADjdW
|
|
44
|
+
V6gs2TC5COgKfSITefciyJewQ4mAje9cFH2O9DlCgRGn8LPf045CrlkWrCmhBU0eDDrYEFhuOFKh
|
|
45
|
+
p8aaOEDNVQ3sSgrkDIHFSM4cctjXbOoUVSuKYdiOhW/1s8AOAqGdRG4IsG0tG9QXAvuaAoG0REUq
|
|
46
|
+
I5C03gnvyJEIYCAwoTOMdnrv7t2d34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bOC/ch
|
|
59
|
+
Ue9OyVZai86xq4a4n7BJbXzDfU/yUXbx6GYVNjROyjThkoNYPLzwr+m9u9amvhtNx9H+7+eWtqxz
|
|
60
|
+
1ptt2t8JgUGhvojXg0tJp0a2Y9+JtqZpkwUatNCn7EVYqf488UGUKOeK0PvT2SQ/b9cPXfTON74T
|
|
61
|
+
2FHNxtI48L4F2R8cOxy+iCqonhKJsoaFvZv05j00448GQ4TaN/rl/+j9daJX0uCtJY3Z6Y12mNbp
|
|
62
|
+
jP93+HHeng6GdNX6xYF0TYPhkL8WzT+9OeRng+s4NHLgYVqcDIt8tLvkb7nmuuOCAN9W48m8olfE
|
|
63
|
+
mcIPkhpZUKPbNMfB9o9Y9NYMVfB7yYfNyTCSBt66ku3ZWjWlyK6nijJa8+vvqKC/Cyp9qbEdnbfs
|
|
64
|
+
kmf7Ej7cfezvRBiUiicGMc2e8sz6qg1+I9naddbmWcmOpX5QlLzL1plE32ZP/8uzbvw7aYNv2vgQ
|
|
65
|
+
/ZacZOvLWX5c4oay9Ww6my0X18vV4lr/W8bfpGPA1Wr+cn2IWl5fr64uF1fzPIs+oj0GXM+el8a9
|
|
66
|
+
N/PL+c18dfOUZ3KQSM1Dya6i0AZOf0ll+2CWeHNZbhaLWZZnnx+q4B81/fTvF+jxYTb/NI/V8vBp
|
|
67
|
+
Sfgoq8XerT6tLm9bt8qenv71FwAAAP//AwA+gIE4JQ4AAA==
|
|
68
|
+
headers:
|
|
69
|
+
CF-Cache-Status:
|
|
70
|
+
- DYNAMIC
|
|
71
|
+
CF-RAY:
|
|
72
|
+
- 89d12ec96e290db6-MRS
|
|
73
|
+
Cache-Control:
|
|
74
|
+
- private, max-age=0, no-store, no-cache, must-revalidate
|
|
75
|
+
Connection:
|
|
76
|
+
- keep-alive
|
|
77
|
+
Content-Encoding:
|
|
78
|
+
- gzip
|
|
79
|
+
Content-Type:
|
|
80
|
+
- application/json
|
|
81
|
+
Date:
|
|
82
|
+
- Tue, 02 Jul 2024 19:53:35 GMT
|
|
83
|
+
Server:
|
|
84
|
+
- cloudflare
|
|
85
|
+
Set-Cookie:
|
|
86
|
+
- __cf_bm=OFVZ5MTau_NNKPRUjheAMGYEZwox8.Qq_TAJs9A8z9o-1719950015-1.0.1.1-YU6dEHFQYzVO94VNwt3L81BuUTSs4sB_HQMi3jSugKQXoHPMGGETjuF.x_A_nltCq46MxBSKnw1V6rznSKA4ZQ;
|
|
87
|
+
path=/; expires=Tue, 02-Jul-24 20:23:35 GMT; domain=.groq.com; HttpOnly; Secure;
|
|
88
|
+
SameSite=None
|
|
89
|
+
Transfer-Encoding:
|
|
90
|
+
- chunked
|
|
91
|
+
alt-svc:
|
|
92
|
+
- h3=":443"; ma=86400
|
|
93
|
+
vary:
|
|
94
|
+
- Origin
|
|
95
|
+
via:
|
|
96
|
+
- 1.1 google
|
|
97
|
+
x-ratelimit-limit-requests:
|
|
98
|
+
- '14400'
|
|
99
|
+
x-ratelimit-limit-tokens:
|
|
100
|
+
- '30000'
|
|
101
|
+
x-ratelimit-remaining-requests:
|
|
102
|
+
- '14399'
|
|
103
|
+
x-ratelimit-remaining-tokens:
|
|
104
|
+
- '29985'
|
|
105
|
+
x-ratelimit-reset-requests:
|
|
106
|
+
- 6s
|
|
107
|
+
x-ratelimit-reset-tokens:
|
|
108
|
+
- 30ms
|
|
109
|
+
x-request-id:
|
|
110
|
+
- req_01j1tg4yj4eaqs83wn8j829pn8
|
|
111
|
+
status:
|
|
112
|
+
code: 200
|
|
113
|
+
message: OK
|
|
114
|
+
version: 1
|