langtrace-python-sdk 3.1.2__py3-none-any.whl → 3.1.4__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,6 +33,7 @@ SERVICE_PROVIDERS = {
33
33
  "MISTRAL": "Mistral",
34
34
  "EMBEDCHAIN": "Embedchain",
35
35
  "AUTOGEN": "Autogen",
36
+ "XAI": "XAI",
36
37
  }
37
38
 
38
39
  LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY = "langtrace_additional_attributes"
@@ -55,6 +55,8 @@ def chat_completions_create(original_method, version, tracer):
55
55
  service_provider = SERVICE_PROVIDERS["PPLX"]
56
56
  elif "azure" in get_base_url(instance):
57
57
  service_provider = SERVICE_PROVIDERS["AZURE"]
58
+ elif "x.ai" in get_base_url(instance):
59
+ service_provider = SERVICE_PROVIDERS["XAI"]
58
60
 
59
61
  # handle tool calls in the kwargs
60
62
  llm_prompts = []
@@ -274,6 +276,8 @@ def async_chat_completions_create(original_method, version, tracer):
274
276
  service_provider = SERVICE_PROVIDERS["PPLX"]
275
277
  elif "azure" in get_base_url(instance):
276
278
  service_provider = SERVICE_PROVIDERS["AZURE"]
279
+ elif "x.ai" in get_base_url(instance):
280
+ service_provider = SERVICE_PROVIDERS["XAI"]
277
281
 
278
282
  # handle tool calls in the kwargs
279
283
  llm_prompts = []
@@ -248,6 +248,8 @@ def chat_completions_create(version: str, tracer: Tracer) -> Callable:
248
248
  service_provider = SERVICE_PROVIDERS["AZURE"]
249
249
  elif "groq" in get_base_url(instance):
250
250
  service_provider = SERVICE_PROVIDERS["GROQ"]
251
+ elif "x.ai" in get_base_url(instance):
252
+ service_provider = SERVICE_PROVIDERS["XAI"]
251
253
  llm_prompts = []
252
254
  for item in kwargs.get("messages", []):
253
255
  tools = get_tool_calls(item)
@@ -336,6 +338,8 @@ def async_chat_completions_create(version: str, tracer: Tracer) -> Callable:
336
338
  service_provider = SERVICE_PROVIDERS["PPLX"]
337
339
  elif "azure" in get_base_url(instance):
338
340
  service_provider = SERVICE_PROVIDERS["AZURE"]
341
+ elif "x.ai" in get_base_url(instance):
342
+ service_provider = SERVICE_PROVIDERS["XAI"]
339
343
  llm_prompts = []
340
344
  for item in kwargs.get("messages", []):
341
345
  tools = get_tool_calls(item)
@@ -249,6 +249,8 @@ def chat_completions_create(version: str, tracer: Tracer) -> Callable:
249
249
  service_provider = SERVICE_PROVIDERS["AZURE"]
250
250
  elif "groq" in get_base_url(instance):
251
251
  service_provider = SERVICE_PROVIDERS["GROQ"]
252
+ elif "x.ai" in get_base_url(instance):
253
+ service_provider = SERVICE_PROVIDERS["XAI"]
252
254
  llm_prompts = []
253
255
  for item in kwargs.get("messages", []):
254
256
  tools = get_tool_calls(item)
@@ -337,6 +339,8 @@ def async_chat_completions_create(version: str, tracer: Tracer) -> Callable:
337
339
  service_provider = SERVICE_PROVIDERS["PPLX"]
338
340
  elif "azure" in get_base_url(instance):
339
341
  service_provider = SERVICE_PROVIDERS["AZURE"]
342
+ elif "x.ai" in get_base_url(instance):
343
+ service_provider = SERVICE_PROVIDERS["XAI"]
340
344
  llm_prompts = []
341
345
  for item in kwargs.get("messages", []):
342
346
  tools = get_tool_calls(item)
@@ -1 +1 @@
1
- __version__ = "3.1.2"
1
+ __version__ = "3.1.4"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: langtrace-python-sdk
3
- Version: 3.1.2
3
+ Version: 3.1.4
4
4
  Summary: Python SDK for LangTrace
5
5
  Project-URL: Homepage, https://github.com/Scale3-Labs/langtrace-python-sdk
6
6
  Author-email: Scale3 Labs <engineering@scale3labs.com>
@@ -99,14 +99,14 @@ examples/weaviate_example/__init__.py,sha256=8JMDBsRSEV10HfTd-YC7xb4txBjD3la56sn
99
99
  examples/weaviate_example/query_text.py,sha256=wPHQTc_58kPoKTZMygVjTj-2ZcdrIuaausJfMxNQnQc,127162
100
100
  langtrace_python_sdk/__init__.py,sha256=VZM6i71NR7pBQK6XvJWRelknuTYUhqwqE7PlicKa5Wg,1166
101
101
  langtrace_python_sdk/langtrace.py,sha256=dSOJtEGCq-D4EGWoBfLOF6xGy1IBYk5EG7zatq_h0-Y,12344
102
- langtrace_python_sdk/version.py,sha256=EkxTxShULe9D7KtZB_iICEO13IyzloAxfYgXHGwpMhQ,22
102
+ langtrace_python_sdk/version.py,sha256=2uixSkocUHf2KiY1oTfzz_5AQGmlrHnypVxGgr4mV9c,22
103
103
  langtrace_python_sdk/constants/__init__.py,sha256=3CNYkWMdd1DrkGqzLUgNZXjdAlM6UFMlf_F-odAToyc,146
104
104
  langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=d-3Qn5C_NTy1NkmdavZvy-6vePwTC5curN6QMy2haHc,50
105
105
  langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
106
106
  langtrace_python_sdk/constants/instrumentation/anthropic.py,sha256=YX3llt3zwDY6XrYk3CB8WEVqgrzRXEw_ffyk56JoF3k,126
107
107
  langtrace_python_sdk/constants/instrumentation/chroma.py,sha256=hiPGYdHS0Yj4Kh3eaYBbuCAl_swqIygu80yFqkOgdak,955
108
108
  langtrace_python_sdk/constants/instrumentation/cohere.py,sha256=tf9sDfb5K3qOAHChEE5o8eYWPZ1io58VsOjZDCZPxfw,577
109
- langtrace_python_sdk/constants/instrumentation/common.py,sha256=yqSheP9Yx_otzrau3KgdMSNHMvBpWzt2ahifoDTbLCg,1045
109
+ langtrace_python_sdk/constants/instrumentation/common.py,sha256=u1OcvdH8jDly5qG9nK_2ZM8Iaqu2bbUJU0KTYhF638s,1063
110
110
  langtrace_python_sdk/constants/instrumentation/embedchain.py,sha256=HodCJvaFjILoOG50OwFObxfVxt_8VUaIAIqvgoN3tzo,278
111
111
  langtrace_python_sdk/constants/instrumentation/gemini.py,sha256=UAmfgg9FM7uNeOCdPfWlir6OIH-8BoxFGPRpdBd9ZZs,358
112
112
  langtrace_python_sdk/constants/instrumentation/groq.py,sha256=VFXmIl4aqGY_fS0PAmjPj_Qm7Tibxbx7Ur_e7rQpqXc,134
@@ -149,7 +149,7 @@ langtrace_python_sdk/instrumentation/gemini/instrumentation.py,sha256=eGWr2dy1f_
149
149
  langtrace_python_sdk/instrumentation/gemini/patch.py,sha256=thhqxrzk-nLiV0lzEwVWzbzOJndDarYIck6N9Gq3aTM,6151
150
150
  langtrace_python_sdk/instrumentation/groq/__init__.py,sha256=ZXeq_nrej6Lm_uoMFEg8wbSejhjB2UJ5IoHQBPc2-C0,91
151
151
  langtrace_python_sdk/instrumentation/groq/instrumentation.py,sha256=Ttf07XVKhdYY1_fqJc7QWiSdmgEhEVyQB_3Az2_wqYo,1832
152
- langtrace_python_sdk/instrumentation/groq/patch.py,sha256=MNz2brkSDQT2eRKJFAwUwMEOca9TQC4gsuYIx7WpEA4,22955
152
+ langtrace_python_sdk/instrumentation/groq/patch.py,sha256=J0h8SXEw2LyMIJhKZTVydEysyKfSLWkCuhEharzDS4w,23161
153
153
  langtrace_python_sdk/instrumentation/langchain/__init__.py,sha256=-7ZkqQFu64F-cxSFd1ZPrciODKqmUIyUbQQ-eHuQPyM,101
154
154
  langtrace_python_sdk/instrumentation/langchain/instrumentation.py,sha256=mek9-wlkuhFd7teSveQEd717i_a9yQtGdGyw7jOMIdo,3860
155
155
  langtrace_python_sdk/instrumentation/langchain/patch.py,sha256=sjmY-Ciu6G-qRV_mHJ2HFWqbEWXnA75GH_WFK_d_p6o,4410
@@ -164,7 +164,7 @@ langtrace_python_sdk/instrumentation/langgraph/instrumentation.py,sha256=SUZZhWS
164
164
  langtrace_python_sdk/instrumentation/langgraph/patch.py,sha256=PGe1ZywXctB_yYqnp8AtD8Xqj7EZ087-S5_2vLRYhEQ,4987
165
165
  langtrace_python_sdk/instrumentation/litellm/__init__.py,sha256=8uziCc56rFSRiPkYcrcBRbtppOANkZ7uZssCKAl2MKk,97
166
166
  langtrace_python_sdk/instrumentation/litellm/instrumentation.py,sha256=Km2q_yfZU6nSqPEXG2xbtTSjqv7xSS92Kxqzw-GtQno,2655
167
- langtrace_python_sdk/instrumentation/litellm/patch.py,sha256=6ed50KrSC-2Upoh12BlcqfRVzZ1iXcTr8U9cVh9LhvU,24263
167
+ langtrace_python_sdk/instrumentation/litellm/patch.py,sha256=wGPOlrLo4RHj1lXNv6wOz5H_p4G0XtzhVjgc-2m7Gik,24469
168
168
  langtrace_python_sdk/instrumentation/litellm/types.py,sha256=aVkoa7tmAbYfyOhnyMrDaVjQuwhmRNLMthlNtKMtWX8,4311
169
169
  langtrace_python_sdk/instrumentation/llamaindex/__init__.py,sha256=rHvuqpuQKLj57Ow7vuKRqxAN5jT0b5NBeHwhXbbnRa4,103
170
170
  langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py,sha256=8iAg-Oxwf2W4S60qRfO5mvzORYxublgq7FdGWqUB4q8,2965
@@ -177,7 +177,7 @@ langtrace_python_sdk/instrumentation/ollama/instrumentation.py,sha256=jdsvkqUJAA
177
177
  langtrace_python_sdk/instrumentation/ollama/patch.py,sha256=7ETx0tQic5h_kH1f-IeptFwgNTBb4hSkTkWsB18Avm0,5375
178
178
  langtrace_python_sdk/instrumentation/openai/__init__.py,sha256=VPHRNCQEdkizIVP2d0Uw_a7t8XOTSTprEIB8oboJFbs,95
179
179
  langtrace_python_sdk/instrumentation/openai/instrumentation.py,sha256=PZxI0qfoud1VsKGmJu49YDp0Z9z9TzCR8qxR3uznOMA,2810
180
- langtrace_python_sdk/instrumentation/openai/patch.py,sha256=_xpvGmWBQtu_J0aPesgk-J6zXpZFblG3ukvs9ZzAm0w,24225
180
+ langtrace_python_sdk/instrumentation/openai/patch.py,sha256=MacQoaqs5b3zgCkD6z2k6fP9mruRtLSLWNNBXuZ70m8,24431
181
181
  langtrace_python_sdk/instrumentation/openai/types.py,sha256=aVkoa7tmAbYfyOhnyMrDaVjQuwhmRNLMthlNtKMtWX8,4311
182
182
  langtrace_python_sdk/instrumentation/pinecone/__init__.py,sha256=DzXyGh9_MGWveJvXULkFwdkf7PbG2s3bAWtT1Dmz7Ok,99
183
183
  langtrace_python_sdk/instrumentation/pinecone/instrumentation.py,sha256=HDXkRITrVPwdQEoOYJOfMzZE_2-vDDvuqHTlD8W1lQw,1845
@@ -243,8 +243,8 @@ tests/pinecone/cassettes/test_query.yaml,sha256=b5v9G3ssUy00oG63PlFUR3JErF2Js-5A
243
243
  tests/pinecone/cassettes/test_upsert.yaml,sha256=neWmQ1v3d03V8WoLl8FoFeeCYImb8pxlJBWnFd_lITU,38607
244
244
  tests/qdrant/conftest.py,sha256=9n0uHxxIjWk9fbYc4bx-uP8lSAgLBVx-cV9UjnsyCHM,381
245
245
  tests/qdrant/test_qdrant.py,sha256=pzjAjVY2kmsmGfrI2Gs2xrolfuaNHz7l1fqGQCjp5_o,3353
246
- langtrace_python_sdk-3.1.2.dist-info/METADATA,sha256=tR9LgCLpeqUgMSTlY8HdEFid0XOtbSbgiIqkPro9ajA,15868
247
- langtrace_python_sdk-3.1.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
248
- langtrace_python_sdk-3.1.2.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
249
- langtrace_python_sdk-3.1.2.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
250
- langtrace_python_sdk-3.1.2.dist-info/RECORD,,
246
+ langtrace_python_sdk-3.1.4.dist-info/METADATA,sha256=0h7-Uf5JP-OMUvLeS883Nn_H1MYjq1j4r841sCqvdvs,15868
247
+ langtrace_python_sdk-3.1.4.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
248
+ langtrace_python_sdk-3.1.4.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
249
+ langtrace_python_sdk-3.1.4.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
250
+ langtrace_python_sdk-3.1.4.dist-info/RECORD,,