langtrace-python-sdk 3.3.19__py3-none-any.whl → 3.3.21__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- langtrace_python_sdk/instrumentation/autogen/patch.py +10 -7
- langtrace_python_sdk/instrumentation/weaviate/patch.py +4 -2
- langtrace_python_sdk/version.py +1 -1
- {langtrace_python_sdk-3.3.19.dist-info → langtrace_python_sdk-3.3.21.dist-info}/METADATA +1 -1
- {langtrace_python_sdk-3.3.19.dist-info → langtrace_python_sdk-3.3.21.dist-info}/RECORD +8 -8
- {langtrace_python_sdk-3.3.19.dist-info → langtrace_python_sdk-3.3.21.dist-info}/WHEEL +0 -0
- {langtrace_python_sdk-3.3.19.dist-info → langtrace_python_sdk-3.3.21.dist-info}/entry_points.txt +0 -0
- {langtrace_python_sdk-3.3.19.dist-info → langtrace_python_sdk-3.3.21.dist-info}/licenses/LICENSE +0 -0
@@ -92,13 +92,16 @@ def patch_generate_reply(name, version, tracer: Tracer):
|
|
92
92
|
set_span_attributes(span, attributes)
|
93
93
|
set_event_completion(span, [{"role": "assistant", "content": result}])
|
94
94
|
if llm_config:
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
95
|
+
if instance.get_total_usage() is not None:
|
96
|
+
total_cost, response_model = list(
|
97
|
+
instance.get_total_usage().keys()
|
98
|
+
)
|
99
|
+
set_span_attribute(
|
100
|
+
span, SpanAttributes.LLM_RESPONSE_MODEL, response_model
|
101
|
+
)
|
102
|
+
set_usage_attributes(
|
103
|
+
span, instance.get_total_usage().get(response_model)
|
104
|
+
)
|
102
105
|
|
103
106
|
return result
|
104
107
|
|
@@ -49,7 +49,9 @@ METADATA_ATTRIBUTES = [
|
|
49
49
|
def extract_inputs(args, kwargs):
|
50
50
|
extracted_params = {}
|
51
51
|
kwargs_without_properties = {
|
52
|
-
k: v
|
52
|
+
k: v
|
53
|
+
for k, v in kwargs.items()
|
54
|
+
if k not in ["properties", "fusion_type", "filters"]
|
53
55
|
}
|
54
56
|
extracted_params.update(extract_input_params(args, kwargs_without_properties))
|
55
57
|
if kwargs.get("filters", None):
|
@@ -94,7 +96,7 @@ def aggregate_responses(result):
|
|
94
96
|
# For single object responses
|
95
97
|
all_responses = get_response_object_attributes(result)
|
96
98
|
|
97
|
-
return json.dumps(all_responses)
|
99
|
+
return json.dumps(all_responses, default=str)
|
98
100
|
|
99
101
|
|
100
102
|
def get_response_object_attributes(response_object):
|
langtrace_python_sdk/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "3.3.
|
1
|
+
__version__ = "3.3.21"
|
@@ -109,7 +109,7 @@ examples/weaviate_example/__init__.py,sha256=8JMDBsRSEV10HfTd-YC7xb4txBjD3la56sn
|
|
109
109
|
examples/weaviate_example/query_text.py,sha256=wPHQTc_58kPoKTZMygVjTj-2ZcdrIuaausJfMxNQnQc,127162
|
110
110
|
langtrace_python_sdk/__init__.py,sha256=VZM6i71NR7pBQK6XvJWRelknuTYUhqwqE7PlicKa5Wg,1166
|
111
111
|
langtrace_python_sdk/langtrace.py,sha256=nvPaJc426Iww3ildrhsSacXtLdzsZIa94_rlK2giyVM,13153
|
112
|
-
langtrace_python_sdk/version.py,sha256=
|
112
|
+
langtrace_python_sdk/version.py,sha256=FgIp-K9CuZgCkI8xMNisdW4atuWh6YalE8E2kUmjXx4,23
|
113
113
|
langtrace_python_sdk/constants/__init__.py,sha256=3CNYkWMdd1DrkGqzLUgNZXjdAlM6UFMlf_F-odAToyc,146
|
114
114
|
langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=EVCrouYCpY98f0KSaKr4PzNxPULTZZO6dSA_crEOyJU,106
|
115
115
|
langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -141,7 +141,7 @@ langtrace_python_sdk/instrumentation/anthropic/patch.py,sha256=ztPN4VZujoxYOKhTb
|
|
141
141
|
langtrace_python_sdk/instrumentation/anthropic/types.py,sha256=WdeXe2tkjAisMLK38STKwVe7MJS5SLoETJ_aKhA_-UU,2463
|
142
142
|
langtrace_python_sdk/instrumentation/autogen/__init__.py,sha256=unDhpqWQIdHFw24lRsRu1Mm1NCZxZgyBrPRZrAJL3Lo,90
|
143
143
|
langtrace_python_sdk/instrumentation/autogen/instrumentation.py,sha256=MVDUCBi6XzLQYmZd6myAounI0HeM8QWX5leuul5Hj0Q,1262
|
144
|
-
langtrace_python_sdk/instrumentation/autogen/patch.py,sha256=
|
144
|
+
langtrace_python_sdk/instrumentation/autogen/patch.py,sha256=7Sq3C8Q5tT27UkWXd1SZgnLC1pbQf_tpTrxoBIYsDw4,5273
|
145
145
|
langtrace_python_sdk/instrumentation/aws_bedrock/__init__.py,sha256=IHqPgR1kdDvcoV1nUb-B21PaJ_qbQB0jc011Udi1ioU,96
|
146
146
|
langtrace_python_sdk/instrumentation/aws_bedrock/instrumentation.py,sha256=2l-WiyWYUEoGre92rmylq2jPZ5w4jcxTXmCTuQNC1RU,1911
|
147
147
|
langtrace_python_sdk/instrumentation/aws_bedrock/patch.py,sha256=VAroMezSGKT2jQ5tggbdiMRIPr9mtLItGJJgZ-xoGls,6296
|
@@ -215,7 +215,7 @@ langtrace_python_sdk/instrumentation/vertexai/instrumentation.py,sha256=yz4trw0B
|
|
215
215
|
langtrace_python_sdk/instrumentation/vertexai/patch.py,sha256=55xwmkFfeevEc4yOHPRxwdeRrsS6UptcZoMq-yeFrt4,4471
|
216
216
|
langtrace_python_sdk/instrumentation/weaviate/__init__.py,sha256=Mc-Je6evPo-kKQzerTG7bd1XO5JOh4YGTE3wBxaUBwg,99
|
217
217
|
langtrace_python_sdk/instrumentation/weaviate/instrumentation.py,sha256=Kwq5QQTUQNRHrWrMnNe9X0TcqtXGiNpBidsuToRTqG0,2417
|
218
|
-
langtrace_python_sdk/instrumentation/weaviate/patch.py,sha256=
|
218
|
+
langtrace_python_sdk/instrumentation/weaviate/patch.py,sha256=Lqixz32uAvDA2VLU3zXLiJ9ohpKeD_LveahX7uro3ZY,6934
|
219
219
|
langtrace_python_sdk/types/__init__.py,sha256=2VykM6fNHRlkOaIEUCdK3VyaaVgk2rTIr9jMmCVj2Ag,4676
|
220
220
|
langtrace_python_sdk/utils/__init__.py,sha256=VVDOG-QLd59ZvSHp0avjof0sbxlZ1QQOf0KoOF7ofhQ,3310
|
221
221
|
langtrace_python_sdk/utils/langtrace_sampler.py,sha256=BupNndHbU9IL_wGleKetz8FdcveqHMBVz1bfKTTW80w,1753
|
@@ -270,8 +270,8 @@ tests/pinecone/cassettes/test_query.yaml,sha256=b5v9G3ssUy00oG63PlFUR3JErF2Js-5A
|
|
270
270
|
tests/pinecone/cassettes/test_upsert.yaml,sha256=neWmQ1v3d03V8WoLl8FoFeeCYImb8pxlJBWnFd_lITU,38607
|
271
271
|
tests/qdrant/conftest.py,sha256=9n0uHxxIjWk9fbYc4bx-uP8lSAgLBVx-cV9UjnsyCHM,381
|
272
272
|
tests/qdrant/test_qdrant.py,sha256=pzjAjVY2kmsmGfrI2Gs2xrolfuaNHz7l1fqGQCjp5_o,3353
|
273
|
-
langtrace_python_sdk-3.3.
|
274
|
-
langtrace_python_sdk-3.3.
|
275
|
-
langtrace_python_sdk-3.3.
|
276
|
-
langtrace_python_sdk-3.3.
|
277
|
-
langtrace_python_sdk-3.3.
|
273
|
+
langtrace_python_sdk-3.3.21.dist-info/METADATA,sha256=nXKNrJYvlgb66g57jWoUtOqOldTmw7X2BQ1nQtHp3NA,15676
|
274
|
+
langtrace_python_sdk-3.3.21.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
275
|
+
langtrace_python_sdk-3.3.21.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
|
276
|
+
langtrace_python_sdk-3.3.21.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
277
|
+
langtrace_python_sdk-3.3.21.dist-info/RECORD,,
|
File without changes
|
{langtrace_python_sdk-3.3.19.dist-info → langtrace_python_sdk-3.3.21.dist-info}/entry_points.txt
RENAMED
File without changes
|
{langtrace_python_sdk-3.3.19.dist-info → langtrace_python_sdk-3.3.21.dist-info}/licenses/LICENSE
RENAMED
File without changes
|