langtrace-python-sdk 2.3.7__py3-none-any.whl → 2.3.8__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.
- langtrace_python_sdk/instrumentation/langchain_core/patch.py +3 -5
- langtrace_python_sdk/version.py +1 -1
- {langtrace_python_sdk-2.3.7.dist-info → langtrace_python_sdk-2.3.8.dist-info}/METADATA +1 -1
- {langtrace_python_sdk-2.3.7.dist-info → langtrace_python_sdk-2.3.8.dist-info}/RECORD +7 -7
- {langtrace_python_sdk-2.3.7.dist-info → langtrace_python_sdk-2.3.8.dist-info}/WHEEL +0 -0
- {langtrace_python_sdk-2.3.7.dist-info → langtrace_python_sdk-2.3.8.dist-info}/entry_points.txt +0 -0
- {langtrace_python_sdk-2.3.7.dist-info → langtrace_python_sdk-2.3.8.dist-info}/licenses/LICENSE +0 -0
|
@@ -87,13 +87,11 @@ def generic_patch(
|
|
|
87
87
|
completion_tokens = result.usage.completion_tokens
|
|
88
88
|
span.set_attribute(SpanAttributes.LLM_USAGE_PROMPT_TOKENS, prompt_tokens)
|
|
89
89
|
span.set_attribute(SpanAttributes.LLM_USAGE_COMPLETION_TOKENS, completion_tokens)
|
|
90
|
-
|
|
91
|
-
elif result.generations[0][0].text:
|
|
90
|
+
elif hasattr(result, 'generations') and len(result.generations) > 0 and len(result.generations[0]) > 0 and hasattr(result.generations[0][0], 'text') and isinstance(result.generations[0][0].text, str):
|
|
92
91
|
span.set_attribute(SpanAttributes.LLM_USAGE_COMPLETION_TOKENS, instance.get_num_tokens(result.generations[0][0].text))
|
|
93
|
-
elif
|
|
92
|
+
elif len(args) > 0 and len(args[0]) > 0 and not hasattr(args[0][0], 'text') and hasattr(instance, 'get_num_tokens'):
|
|
94
93
|
span.set_attribute(SpanAttributes.LLM_USAGE_PROMPT_TOKENS, instance.get_num_tokens(args[0][0]))
|
|
95
|
-
|
|
96
|
-
else:
|
|
94
|
+
elif len(args) > 0 and len(args[0]) > 0 and hasattr(args[0][0], 'text') and isinstance(args[0][0].text, str) and hasattr(instance, 'get_num_tokens'):
|
|
97
95
|
span.set_attribute(SpanAttributes.LLM_USAGE_PROMPT_TOKENS, instance.get_num_tokens(args[0][0].text))
|
|
98
96
|
|
|
99
97
|
span.set_status(StatusCode.OK)
|
langtrace_python_sdk/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.3.
|
|
1
|
+
__version__ = "2.3.8"
|
|
@@ -89,7 +89,7 @@ examples/weaviate_example/__init__.py,sha256=8JMDBsRSEV10HfTd-YC7xb4txBjD3la56sn
|
|
|
89
89
|
examples/weaviate_example/query_text.py,sha256=wPHQTc_58kPoKTZMygVjTj-2ZcdrIuaausJfMxNQnQc,127162
|
|
90
90
|
langtrace_python_sdk/__init__.py,sha256=VZM6i71NR7pBQK6XvJWRelknuTYUhqwqE7PlicKa5Wg,1166
|
|
91
91
|
langtrace_python_sdk/langtrace.py,sha256=rjIEwPd-Iq0mcSCh_3CEK-38kyJwazdR1CfDa_U4mfQ,8468
|
|
92
|
-
langtrace_python_sdk/version.py,sha256=
|
|
92
|
+
langtrace_python_sdk/version.py,sha256=o9VOJSt96CdfTqQjfCid0JeeND10d3k_60KkoQHhpas,22
|
|
93
93
|
langtrace_python_sdk/constants/__init__.py,sha256=P8QvYwt5czUNDZsKS64vxm9Dc41ptGbuF1TFtAF6nv4,44
|
|
94
94
|
langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=5MNjnAOg-4am78J3gVMH6FSwq5N8TOj72ugkhsw4vi0,46
|
|
95
95
|
langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -144,7 +144,7 @@ langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py,sha2
|
|
|
144
144
|
langtrace_python_sdk/instrumentation/langchain_community/patch.py,sha256=fn-FBbu56ko7XSer0dDdQtIaXcsdZ7L_il_YjnAdL8I,5817
|
|
145
145
|
langtrace_python_sdk/instrumentation/langchain_core/__init__.py,sha256=kumE_reeqgM-ZvEZ6-XxyT-F-HAdKq_v_PKvsLb4EZQ,110
|
|
146
146
|
langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py,sha256=0Sh-CBXeeMYpK05rS33kCmyjRe6xHuqnbLcBlXpj46I,6342
|
|
147
|
-
langtrace_python_sdk/instrumentation/langchain_core/patch.py,sha256=
|
|
147
|
+
langtrace_python_sdk/instrumentation/langchain_core/patch.py,sha256=axy84D5FcqsY70z4fgIkYsKr6FxV2KEdqvR2fX5YKI0,10919
|
|
148
148
|
langtrace_python_sdk/instrumentation/langgraph/__init__.py,sha256=eitlHloY-aZ4ZuIEJx61AadEA3G7siyecP-V-lziAr8,101
|
|
149
149
|
langtrace_python_sdk/instrumentation/langgraph/instrumentation.py,sha256=SUZZhWSIbcfsF1S5NtEqW8QzkRM_pKAuXB7pwk5tsOU,2526
|
|
150
150
|
langtrace_python_sdk/instrumentation/langgraph/patch.py,sha256=PGe1ZywXctB_yYqnp8AtD8Xqj7EZ087-S5_2vLRYhEQ,4987
|
|
@@ -225,8 +225,8 @@ tests/pinecone/cassettes/test_query.yaml,sha256=b5v9G3ssUy00oG63PlFUR3JErF2Js-5A
|
|
|
225
225
|
tests/pinecone/cassettes/test_upsert.yaml,sha256=neWmQ1v3d03V8WoLl8FoFeeCYImb8pxlJBWnFd_lITU,38607
|
|
226
226
|
tests/qdrant/conftest.py,sha256=9n0uHxxIjWk9fbYc4bx-uP8lSAgLBVx-cV9UjnsyCHM,381
|
|
227
227
|
tests/qdrant/test_qdrant.py,sha256=pzjAjVY2kmsmGfrI2Gs2xrolfuaNHz7l1fqGQCjp5_o,3353
|
|
228
|
-
langtrace_python_sdk-2.3.
|
|
229
|
-
langtrace_python_sdk-2.3.
|
|
230
|
-
langtrace_python_sdk-2.3.
|
|
231
|
-
langtrace_python_sdk-2.3.
|
|
232
|
-
langtrace_python_sdk-2.3.
|
|
228
|
+
langtrace_python_sdk-2.3.8.dist-info/METADATA,sha256=3WZWxVzEuOhYpL85H1FqrPv17y2Ru3929JFkKeCZECs,15011
|
|
229
|
+
langtrace_python_sdk-2.3.8.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
230
|
+
langtrace_python_sdk-2.3.8.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
|
|
231
|
+
langtrace_python_sdk-2.3.8.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
232
|
+
langtrace_python_sdk-2.3.8.dist-info/RECORD,,
|
|
File without changes
|
{langtrace_python_sdk-2.3.7.dist-info → langtrace_python_sdk-2.3.8.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{langtrace_python_sdk-2.3.7.dist-info → langtrace_python_sdk-2.3.8.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|