langtrace-python-sdk 2.2.11__py3-none-any.whl → 2.2.13__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.
@@ -294,7 +294,7 @@ def chat_completions_create(original_method, version, tracer):
294
294
  prompt_tokens = 0
295
295
  for message in kwargs.get("messages", {}):
296
296
  prompt_tokens += calculate_prompt_tokens(
297
- json.dumps(message), kwargs.get("model")
297
+ json.dumps(str(message)), kwargs.get("model")
298
298
  )
299
299
 
300
300
  if (
@@ -388,7 +388,7 @@ def async_chat_completions_create(original_method, version, tracer):
388
388
  prompt_tokens = 0
389
389
  for message in kwargs.get("messages", {}):
390
390
  prompt_tokens += calculate_prompt_tokens(
391
- json.dumps(message), kwargs.get("model")
391
+ json.dumps((str(message))), kwargs.get("model")
392
392
  )
393
393
 
394
394
  if (
@@ -582,12 +582,11 @@ def extract_content(choice):
582
582
 
583
583
  @silently_fail
584
584
  def _set_input_attributes(span, kwargs, attributes):
585
-
585
+ tools = []
586
586
  for field, value in attributes.model_dump(by_alias=True).items():
587
587
  set_span_attribute(span, field, value)
588
588
 
589
589
  if kwargs.get("functions") is not None and kwargs.get("functions") != NOT_GIVEN:
590
- tools = []
591
590
  for function in kwargs.get("functions"):
592
591
  tools.append(json.dumps({"type": "function", "function": function}))
593
592
 
@@ -1 +1 @@
1
- __version__ = "2.2.11"
1
+ __version__ = "2.2.13"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: langtrace-python-sdk
3
- Version: 2.2.11
3
+ Version: 2.2.13
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>
@@ -16,7 +16,7 @@ Requires-Dist: opentelemetry-api>=1.25.0
16
16
  Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.25.0
17
17
  Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.25.0
18
18
  Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.46b0
19
- Requires-Dist: opentelemetry-instrumentation>=0.46b0
19
+ Requires-Dist: opentelemetry-instrumentation>=0.47b0
20
20
  Requires-Dist: opentelemetry-sdk>=1.25.0
21
21
  Requires-Dist: sqlalchemy
22
22
  Requires-Dist: tiktoken>=0.1.1
@@ -62,7 +62,7 @@ examples/weaviate_example/__init__.py,sha256=8JMDBsRSEV10HfTd-YC7xb4txBjD3la56sn
62
62
  examples/weaviate_example/query_text.py,sha256=sG8O-bXQpflBAiYpgE_M2X7GcHUlZNgl_wJW8_h-W6Q,127024
63
63
  langtrace_python_sdk/__init__.py,sha256=VZM6i71NR7pBQK6XvJWRelknuTYUhqwqE7PlicKa5Wg,1166
64
64
  langtrace_python_sdk/langtrace.py,sha256=1L0IjME-pzEYht92QfwByPZr3H1MClTrqQdoN1KyKJY,7689
65
- langtrace_python_sdk/version.py,sha256=qJIo9HrvnLhKRfZ4qdHIGF9OG0Fe0xhdOLyCxapfvTM,23
65
+ langtrace_python_sdk/version.py,sha256=QE4rlCxmJzH2l22qDlljlc-dxsJTQ2DZfZ200rwoSXs,23
66
66
  langtrace_python_sdk/constants/__init__.py,sha256=P8QvYwt5czUNDZsKS64vxm9Dc41ptGbuF1TFtAF6nv4,44
67
67
  langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=5MNjnAOg-4am78J3gVMH6FSwq5N8TOj72ugkhsw4vi0,46
68
68
  langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -123,7 +123,7 @@ langtrace_python_sdk/instrumentation/ollama/instrumentation.py,sha256=jdsvkqUJAA
123
123
  langtrace_python_sdk/instrumentation/ollama/patch.py,sha256=ky58NUyAETmaOqSAsB-LzDpoCosY6W54YeAJ9XftE-Q,7878
124
124
  langtrace_python_sdk/instrumentation/openai/__init__.py,sha256=VPHRNCQEdkizIVP2d0Uw_a7t8XOTSTprEIB8oboJFbs,95
125
125
  langtrace_python_sdk/instrumentation/openai/instrumentation.py,sha256=A0BJHRLcZ74TNVg6I0I9M5YWvSpAtXwMmME6N5CEQ_M,2945
126
- langtrace_python_sdk/instrumentation/openai/patch.py,sha256=T0g9BbUw5JWSupZbWCF6sQxO2Auj_oPpAFw0RdVkKLg,24075
126
+ langtrace_python_sdk/instrumentation/openai/patch.py,sha256=ebxUpg0X60e7uK-IPWb_fSDxpP3d5BG-xhOEBIABo14,24082
127
127
  langtrace_python_sdk/instrumentation/pinecone/__init__.py,sha256=DzXyGh9_MGWveJvXULkFwdkf7PbG2s3bAWtT1Dmz7Ok,99
128
128
  langtrace_python_sdk/instrumentation/pinecone/instrumentation.py,sha256=HDXkRITrVPwdQEoOYJOfMzZE_2-vDDvuqHTlD8W1lQw,1845
129
129
  langtrace_python_sdk/instrumentation/pinecone/patch.py,sha256=KiIRRz8kk47FllFT746Cb_w6F6M60AN_pcsguD979E4,5172
@@ -188,8 +188,8 @@ tests/pinecone/cassettes/test_query.yaml,sha256=b5v9G3ssUy00oG63PlFUR3JErF2Js-5A
188
188
  tests/pinecone/cassettes/test_upsert.yaml,sha256=neWmQ1v3d03V8WoLl8FoFeeCYImb8pxlJBWnFd_lITU,38607
189
189
  tests/qdrant/conftest.py,sha256=9n0uHxxIjWk9fbYc4bx-uP8lSAgLBVx-cV9UjnsyCHM,381
190
190
  tests/qdrant/test_qdrant.py,sha256=pzjAjVY2kmsmGfrI2Gs2xrolfuaNHz7l1fqGQCjp5_o,3353
191
- langtrace_python_sdk-2.2.11.dist-info/METADATA,sha256=YtShIB2j1ActL9TCzqL834DDiEvQ9srDBprnZJvvHFE,14705
192
- langtrace_python_sdk-2.2.11.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
193
- langtrace_python_sdk-2.2.11.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
194
- langtrace_python_sdk-2.2.11.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
195
- langtrace_python_sdk-2.2.11.dist-info/RECORD,,
191
+ langtrace_python_sdk-2.2.13.dist-info/METADATA,sha256=xwoiX4avNgPS3ib7fruhsXEw9JRsAEi9Jg-8ME8eV-0,14705
192
+ langtrace_python_sdk-2.2.13.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
193
+ langtrace_python_sdk-2.2.13.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
194
+ langtrace_python_sdk-2.2.13.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
195
+ langtrace_python_sdk-2.2.13.dist-info/RECORD,,