langtrace-python-sdk 2.2.7__py3-none-any.whl → 2.2.9__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.
@@ -1,10 +1,12 @@
1
1
  import fsspec
2
+ from dotenv import find_dotenv, load_dotenv
2
3
  from inspect_ai import Task, task
3
4
  from inspect_ai.dataset import csv_dataset, Sample
4
5
  from inspect_ai.scorer import model_graded_qa
5
6
  from inspect_ai.solver import chain_of_thought, self_critique
6
7
  from langtrace_python_sdk.extensions.langtrace_filesystem import LangTraceFileSystem
7
8
 
9
+ _ = load_dotenv(find_dotenv())
8
10
 
9
11
  # Manually register the filesystem with fsspec
10
12
  # Note: This is only necessary because the filesystem is not registered.
@@ -24,9 +26,9 @@ def hydrate_with_question(record):
24
26
 
25
27
 
26
28
  @task
27
- def pricing_question():
29
+ def basic_eval():
28
30
  return Task(
29
- dataset=csv_dataset("langtracefs://clyythmcs0001145cuvi426zi", hydrate_with_question),
31
+ dataset=csv_dataset("langtracefs://clz0p4i1t000fwv0xjtlvkxyx"),
30
32
  plan=[chain_of_thought(), self_critique()],
31
33
  scorer=model_graded_qa(),
32
34
  )
@@ -0,0 +1,40 @@
1
+ from dotenv import find_dotenv, load_dotenv
2
+ from openai import OpenAI
3
+ from langtrace_python_sdk import langtrace, with_langtrace_root_span, SendUserFeedback
4
+
5
+ _ = load_dotenv(find_dotenv())
6
+
7
+ # Initialize Langtrace SDK
8
+ langtrace.init()
9
+ client = OpenAI()
10
+
11
+
12
+ def api(span_id, trace_id):
13
+ response = client.chat.completions.create(
14
+ model="gpt-4o-mini",
15
+ messages=[
16
+ {"role": "user", "content": "What is the best place to live in the US?"},
17
+ ],
18
+ stream=False,
19
+ )
20
+
21
+ # Collect user feedback and send it to Langtrace
22
+ user_score = 1 # Example user score
23
+ user_id = 'user_1234' # Example user ID
24
+ data = {
25
+ "userScore": user_score,
26
+ "userId": user_id,
27
+ "spanId": span_id,
28
+ "traceId": trace_id
29
+ }
30
+ SendUserFeedback().evaluate(data=data)
31
+
32
+ # Return the response
33
+ return response.choices[0].message.content
34
+
35
+
36
+ # wrap the API call with the Langtrace root span
37
+ wrapped_api = with_langtrace_root_span()(api)
38
+
39
+ # Call the wrapped API
40
+ wrapped_api()
@@ -0,0 +1,41 @@
1
+ import sys
2
+
3
+ sys.path.insert(0, "/Users/karthikkalyanaraman/work/langtrace/langtrace-python-sdk/src")
4
+
5
+ from langtrace_python_sdk import langtrace
6
+ from langtrace_python_sdk.utils.with_root_span import with_langtrace_root_span
7
+ from routellm.controller import Controller
8
+ from dotenv import load_dotenv
9
+
10
+ load_dotenv()
11
+
12
+ langtrace.init()
13
+
14
+ # litellm.set_verbose=True
15
+ client = Controller(
16
+ routers=["mf"],
17
+ strong_model="claude-3-opus-20240229",
18
+ weak_model="claude-3-opus-20240229",
19
+ )
20
+
21
+
22
+ @with_langtrace_root_span("Routellm")
23
+ def Routellm(prompt):
24
+ try:
25
+
26
+ response = client.chat.completions.create(
27
+ model="router-mf-0.11593", messages=[{"role": "user", "content": prompt}]
28
+ )
29
+
30
+ for chunk in response:
31
+ if hasattr(chunk, "choices"):
32
+ print(chunk.choices[0].delta.content or "", end="")
33
+ else:
34
+ print(chunk)
35
+
36
+ except Exception as e:
37
+ print(f"An error occurred: {e}")
38
+
39
+
40
+ Routellm("what is the square root of 12182382932.99")
41
+ Routellm("Write me a short story")
@@ -27,13 +27,25 @@ class OpenMode(str):
27
27
 
28
28
 
29
29
  class LangTraceFile(io.BytesIO):
30
- _host: str = os.environ.get("LANGTRACE_API_HOST", None) or LANGTRACE_REMOTE_URL
31
30
 
32
31
  def __init__(self, fs: "LangTraceFileSystem", path: str, mode: OpenMode):
33
32
  super().__init__()
34
33
  self.fs = fs
35
34
  self.path = path
36
35
  self.mode = mode
36
+ self._host: str = os.environ.get("LANGTRACE_API_HOST", LANGTRACE_REMOTE_URL)
37
+ self._api_key: str = os.environ.get("LANGTRACE_API_KEY", None)
38
+ if self._host.endswith("/api/trace"):
39
+ self._host = self._host.replace("/api/trace", "")
40
+
41
+ if self._api_key is None:
42
+ print(Fore.RED)
43
+ print(
44
+ f"Missing Langtrace API key, proceed to {self._host} to create one"
45
+ )
46
+ print("Set the API key as an environment variable LANGTRACE_API_KEY")
47
+ print(Fore.RESET)
48
+ return
37
49
 
38
50
  def close(self) -> None:
39
51
  if not self.closed:
@@ -71,7 +83,7 @@ class LangTraceFile(io.BytesIO):
71
83
  data=json.dumps(data),
72
84
  headers={
73
85
  "Content-Type": "application/json",
74
- "x-api-key": os.environ.get("LANGTRACE_API_KEY"),
86
+ "x-api-key": self._api_key,
75
87
  },
76
88
  timeout=20,
77
89
  )
@@ -82,7 +94,6 @@ class LangTraceFile(io.BytesIO):
82
94
 
83
95
 
84
96
  class LangTraceFileSystem(AbstractFileSystem):
85
- _host: str = os.environ.get("LANGTRACE_API_HOST", None) or LANGTRACE_REMOTE_URL
86
97
  protocol = "langtracefs"
87
98
  sep = "/"
88
99
 
@@ -90,6 +101,19 @@ class LangTraceFileSystem(AbstractFileSystem):
90
101
  super().__init__(*args, **kwargs)
91
102
  self.files = {}
92
103
  self.dirs = set()
104
+ self._host: str = os.environ.get("LANGTRACE_API_HOST", LANGTRACE_REMOTE_URL)
105
+ self._api_key: str = os.environ.get("LANGTRACE_API_KEY", None)
106
+ if self._host.endswith("/api/trace"):
107
+ self._host = self._host.replace("/api/trace", "")
108
+
109
+ if self._api_key is None:
110
+ print(Fore.RED)
111
+ print(
112
+ f"Missing Langtrace API key, proceed to {self._host} to create one"
113
+ )
114
+ print("Set the API key as an environment variable LANGTRACE_API_KEY")
115
+ print(Fore.RESET)
116
+ return
93
117
 
94
118
  def open(
95
119
  self,
@@ -118,7 +142,7 @@ class LangTraceFileSystem(AbstractFileSystem):
118
142
  url=f"{self._host}/api/dataset/download?id={dataset_id}",
119
143
  headers={
120
144
  "Content-Type": "application/json",
121
- "x-api-key": os.environ.get("LANGTRACE_API_KEY"),
145
+ "x-api-key": self._api_key,
122
146
  },
123
147
  timeout=20,
124
148
  )
@@ -25,6 +25,7 @@ from langtrace_python_sdk.utils.llm import (
25
25
  get_llm_url,
26
26
  is_streaming,
27
27
  set_event_completion,
28
+ set_event_completion_chunk,
28
29
  set_usage_attributes,
29
30
  )
30
31
  from opentelemetry.trace import SpanKind
@@ -119,10 +120,7 @@ def messages_create(original_method, version, tracer):
119
120
  # Assuming span.add_event is part of a larger logging or event system
120
121
  # Add event for each chunk of content
121
122
  if content:
122
- span.add_event(
123
- Event.STREAM_OUTPUT.value,
124
- {SpanAttributes.LLM_CONTENT_COMPLETION_CHUNK: "".join(content)},
125
- )
123
+ set_event_completion_chunk(span, "".join(content))
126
124
 
127
125
  # Assuming this is part of a generator, yield chunk or aggregated content
128
126
  yield content
@@ -22,6 +22,7 @@ from langtrace_python_sdk.utils.llm import (
22
22
  get_extra_attributes,
23
23
  get_llm_url,
24
24
  set_event_completion,
25
+ set_event_completion_chunk,
25
26
  set_usage_attributes,
26
27
  )
27
28
  from langtrace.trace_attributes import Event, LLMSpanAttributes
@@ -403,10 +404,7 @@ def chat_stream(original_method, version, tracer):
403
404
  content = event.text
404
405
  else:
405
406
  content = ""
406
- span.add_event(
407
- Event.STREAM_OUTPUT.value,
408
- {SpanAttributes.LLM_CONTENT_COMPLETION_CHUNK: "".join(content)},
409
- )
407
+ set_event_completion_chunk(span, "".join(content))
410
408
 
411
409
  if (
412
410
  hasattr(event, "finish_reason")
@@ -30,6 +30,7 @@ from langtrace_python_sdk.utils.llm import (
30
30
  get_llm_url,
31
31
  get_langtrace_attributes,
32
32
  set_event_completion,
33
+ set_event_completion_chunk,
33
34
  set_usage_attributes,
34
35
  )
35
36
  from langtrace_python_sdk.constants.instrumentation.common import (
@@ -242,15 +243,14 @@ def chat_completions_create(original_method, version, tracer):
242
243
  content = content + []
243
244
  else:
244
245
  content = []
245
- span.add_event(
246
- Event.STREAM_OUTPUT.value,
247
- {
248
- SpanAttributes.LLM_CONTENT_COMPLETION_CHUNK: (
249
- "".join(content)
250
- if len(content) > 0 and content[0] is not None
251
- else ""
252
- )
253
- },
246
+
247
+ set_event_completion_chunk(
248
+ span,
249
+ (
250
+ "".join(content)
251
+ if len(content) > 0 and content[0] is not None
252
+ else ""
253
+ ),
254
254
  )
255
255
  result_content.append(content[0] if len(content) > 0 else "")
256
256
  yield chunk
@@ -6,6 +6,7 @@ from langtrace_python_sdk.utils.llm import (
6
6
  get_llm_request_attributes,
7
7
  get_llm_url,
8
8
  set_event_completion,
9
+ set_event_completion_chunk,
9
10
  )
10
11
  from langtrace_python_sdk.utils.silently_fail import silently_fail
11
12
  from langtrace_python_sdk.constants.instrumentation.common import SERVICE_PROVIDERS
@@ -177,12 +178,8 @@ def _handle_streaming_response(span, response, api):
177
178
  if api == "generate":
178
179
  accumulated_tokens["response"] += chunk["response"]
179
180
 
180
- span.add_event(
181
- Event.STREAM_OUTPUT.value,
182
- {
183
- SpanAttributes.LLM_CONTENT_COMPLETION_CHUNK: chunk.get("response")
184
- or chunk.get("message").get("content"),
185
- },
181
+ set_event_completion_chunk(
182
+ span, chunk.get("response") or chunk.get("message").get("content")
186
183
  )
187
184
 
188
185
  _set_response_attributes(span, chunk | accumulated_tokens)
@@ -211,12 +208,7 @@ async def _ahandle_streaming_response(span, response, api):
211
208
  if api == "generate":
212
209
  accumulated_tokens["response"] += chunk["response"]
213
210
 
214
- span.add_event(
215
- Event.STREAM_OUTPUT.value,
216
- {
217
- SpanAttributes.LLM_CONTENT_COMPLETION_CHUNK: json.dumps(chunk),
218
- },
219
- )
211
+ set_event_completion_chunk(span, chunk)
220
212
  _set_response_attributes(span, chunk | accumulated_tokens)
221
213
  finally:
222
214
  # Finalize span after processing all chunks
@@ -2,23 +2,32 @@ from openai import NOT_GIVEN
2
2
  from .sdk_version_checker import SDKVersionChecker
3
3
  from opentelemetry.trace import Span
4
4
  from langtrace.trace_attributes import SpanAttributes
5
+ import os
5
6
 
6
7
 
7
8
  def set_span_attribute(span: Span, name, value):
8
9
  if value is not None:
9
10
  if value != "" or value != NOT_GIVEN:
10
11
  if name == SpanAttributes.LLM_PROMPTS:
11
- span.add_event(
12
- name=SpanAttributes.LLM_CONTENT_PROMPT,
13
- attributes={
14
- SpanAttributes.LLM_PROMPTS: value,
15
- },
16
- )
12
+ set_event_prompt(span, value)
17
13
  else:
18
14
  span.set_attribute(name, value)
19
15
  return
20
16
 
21
17
 
18
+ def set_event_prompt(span: Span, prompt):
19
+ enabled = os.environ.get("TRACE_PROMPT_COMPLETION_DATA", "true")
20
+ if enabled.lower() == "false":
21
+ return
22
+
23
+ span.add_event(
24
+ name=SpanAttributes.LLM_CONTENT_PROMPT,
25
+ attributes={
26
+ SpanAttributes.LLM_PROMPTS: prompt,
27
+ },
28
+ )
29
+
30
+
22
31
  def check_if_sdk_is_outdated():
23
32
  SDKVersionChecker().check()
24
33
  return
@@ -30,6 +30,7 @@ import json
30
30
  from opentelemetry import baggage
31
31
  from opentelemetry.trace import Span
32
32
  from opentelemetry.trace.status import StatusCode
33
+ import os
33
34
 
34
35
 
35
36
  def estimate_tokens(prompt):
@@ -42,6 +43,9 @@ def estimate_tokens(prompt):
42
43
 
43
44
 
44
45
  def set_event_completion_chunk(span: Span, chunk):
46
+ enabled = os.environ.get("TRACE_PROMPT_COMPLETION_DATA", "true")
47
+ if enabled.lower() == "false":
48
+ return
45
49
  span.add_event(
46
50
  name=SpanAttributes.LLM_CONTENT_COMPLETION_CHUNK,
47
51
  attributes={
@@ -203,6 +207,9 @@ def get_tool_calls(item):
203
207
 
204
208
 
205
209
  def set_event_completion(span: Span, result_content):
210
+ enabled = os.environ.get("TRACE_PROMPT_COMPLETION_DATA", "true")
211
+ if enabled.lower() == "false":
212
+ return
206
213
 
207
214
  span.add_event(
208
215
  name=SpanAttributes.LLM_CONTENT_COMPLETION,
@@ -352,15 +359,9 @@ class StreamWrapper:
352
359
  )
353
360
  self.completion_tokens += token_counts
354
361
  content.append(tool_call.function.arguments)
355
- self.span.add_event(
356
- Event.STREAM_OUTPUT.value,
357
- {
358
- SpanAttributes.LLM_CONTENT_COMPLETION_CHUNK: (
359
- "".join(content)
360
- if len(content) > 0 and content[0] is not None
361
- else ""
362
- )
363
- },
362
+ set_event_completion_chunk(
363
+ self.span,
364
+ "".join(content) if len(content) > 0 and content[0] is not None else "",
364
365
  )
365
366
  if content:
366
367
  self.result_content.append(content[0])
@@ -369,16 +370,11 @@ class StreamWrapper:
369
370
  token_counts = estimate_tokens(chunk.text)
370
371
  self.completion_tokens += token_counts
371
372
  content = [chunk.text]
372
- self.span.add_event(
373
- Event.STREAM_OUTPUT.value,
374
- {
375
- SpanAttributes.LLM_CONTENT_COMPLETION_CHUNK: (
376
- "".join(content)
377
- if len(content) > 0 and content[0] is not None
378
- else ""
379
- )
380
- },
373
+ set_event_completion_chunk(
374
+ self.span,
375
+ "".join(content) if len(content) > 0 and content[0] is not None else "",
381
376
  )
377
+
382
378
  if content:
383
379
  self.result_content.append(content[0])
384
380
 
@@ -25,6 +25,9 @@ from opentelemetry import baggage, context, trace
25
25
  from opentelemetry.trace import SpanKind
26
26
  from opentelemetry.trace.propagation import set_span_in_context
27
27
 
28
+ from langtrace_python_sdk.constants.exporter.langtrace_exporter import (
29
+ LANGTRACE_REMOTE_URL,
30
+ )
28
31
  from langtrace_python_sdk.constants.instrumentation.common import (
29
32
  LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY,
30
33
  )
@@ -142,7 +145,10 @@ class SendUserFeedback:
142
145
  _langtrace_api_key: str
143
146
 
144
147
  def __init__(self):
145
- self._langtrace_host = os.environ["LANGTRACE_API_HOST"]
148
+ self._langtrace_host = os.environ.get("LANGTRACE_API_HOST", LANGTRACE_REMOTE_URL)
149
+ # When the host is set to /api/trace, remove the /api/trace
150
+ if self._langtrace_host.endswith("/api/trace"):
151
+ self._langtrace_host = self._langtrace_host.replace("/api/trace", "")
146
152
  self._langtrace_api_key = os.environ.get("LANGTRACE_API_KEY", None)
147
153
 
148
154
  def evaluate(self, data: EvaluationAPIData) -> None:
@@ -155,6 +161,16 @@ class SendUserFeedback:
155
161
  print("Set the API key as an environment variable LANGTRACE_API_KEY")
156
162
  print(Fore.RESET)
157
163
  return
164
+
165
+ # convert spanId and traceId to hexadecimals
166
+ span_hex_number = hex(int(data["spanId"], 10))[2:] # Convert to hex and remove the '0x' prefix
167
+ formatted_span_hex_number = span_hex_number.zfill(16) # Pad with zeros to 16 characters
168
+ data["spanId"] = f"0x{formatted_span_hex_number}"
169
+
170
+ trace_hex_number = hex(int(data["traceId"], 10))[2:] # Convert to hex and remove the '0x' prefix
171
+ formatted_trace_hex_number = trace_hex_number.zfill(32) # Pad with zeros to 32 characters
172
+ data["traceId"] = f"0x{formatted_trace_hex_number}"
173
+
158
174
  evaluation = self.get_evaluation(data["spanId"])
159
175
  headers = {"x-api-key": self._langtrace_api_key}
160
176
  if evaluation is not None:
@@ -1 +1 @@
1
- __version__ = "2.2.7"
1
+ __version__ = "2.2.9"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: langtrace-python-sdk
3
- Version: 2.2.7
3
+ Version: 2.2.9
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>
@@ -239,7 +239,7 @@ def main():
239
239
  from langtrace_python_sdk import with_langtrace_root_span, with_additional_attributes
240
240
 
241
241
 
242
- @with_additional_attributes({"user.id": "1234", "user.feedback.rating": 1})
242
+ @with_additional_attributes({"user.id": "1234"})
243
243
  def api_call1():
244
244
  response = client.chat.completions.create(
245
245
  model="gpt-4",
@@ -249,7 +249,7 @@ def api_call1():
249
249
  return response
250
250
 
251
251
 
252
- @with_additional_attributes({"user.id": "5678", "user.feedback.rating": -1})
252
+ @with_additional_attributes({"user.id": "5678"})
253
253
  def api_call2():
254
254
  response = client.chat.completions.create(
255
255
  model="gpt-4",
@@ -273,6 +273,11 @@ from langtrace_python_sdk import get_prompt_from_registry
273
273
  prompt = get_prompt_from_registry(<Registry ID>, options={"prompt_version": 1, "variables": {"foo": "bar"} })
274
274
  ```
275
275
 
276
+ ### Opt out of tracing prompt and completion data
277
+ By default, prompt and completion data are captured. If you would like to opt out of it, set the following env var,
278
+
279
+ `TRACE_PROMPT_COMPLETION_DATA=false`
280
+
276
281
  ## Supported integrations
277
282
 
278
283
  Langtrace automatically captures traces from the following vendors:
@@ -293,6 +298,7 @@ Langtrace automatically captures traces from the following vendors:
293
298
  | CrewAI | Framework | :x: | :white_check_mark: |
294
299
  | Ollama | Framework | :x: | :white_check_mark: |
295
300
  | VertexAI | Framework | :x: | :white_check_mark: |
301
+ | Vercel AI SDK| Framework | :white_check_mark: | :x: |
296
302
  | Pinecone | Vector Database | :white_check_mark: | :white_check_mark: |
297
303
  | ChromaDB | Vector Database | :white_check_mark: | :white_check_mark: |
298
304
  | QDrant | Vector Database | :white_check_mark: | :white_check_mark: |
@@ -21,7 +21,7 @@ examples/gemini_example/__init__.py,sha256=omVgLyIiLc3c0zwy3vTtYKdeenYEXzEbLZsYi
21
21
  examples/gemini_example/function_tools.py,sha256=ZOBrdPy_8s3NDfsF5A4RXIoUi2VXlD8og4UsWz_8AuQ,2700
22
22
  examples/gemini_example/main.py,sha256=cTXqgOa6lEMwgX56uneM-1TbIY_QZtDRkByW5z0LpNk,2470
23
23
  examples/hiveagent_example/basic.py,sha256=Sd7I5w8w5Xx7ODaydTY30yiq9HwJDMKHQywrZjgehP0,441
24
- examples/inspect_ai_example/basic_eval.py,sha256=zNrAyyhFEHnDcl8AUBMyCToYxcQ_Easp5eYaRV5hCYs,994
24
+ examples/inspect_ai_example/basic_eval.py,sha256=hDg2BB9ONNpOGRVH08HsghnS1373sOnq6dyDmUQd9gY,1040
25
25
  examples/langchain_example/__init__.py,sha256=xAys_K5AbVqaJ8d5wCcE6w2tCiTXPkSGMyY9paBXitI,410
26
26
  examples/langchain_example/basic.py,sha256=hrwMHOUv78-su5DP9i5krkQnMGHq0svEXsBa40Jkggg,2981
27
27
  examples/langchain_example/groq_example.py,sha256=egrg3FHCnSJ-kV22Z2_t9ElJfKilddfcO5bwcKCfc5M,1060
@@ -42,6 +42,7 @@ examples/openai_example/embeddings_create.py,sha256=kcOZpl5nhHo_NC-3n2yKX5W8mAzN
42
42
  examples/openai_example/function_calling.py,sha256=zz-JdCcpP7uCXG21EYXF1Y39IKj6gYt2fOP5N_ywpnc,2338
43
43
  examples/openai_example/images_edit.py,sha256=6dSKA40V39swSs1mWdWXSa0reK4tyNBkK9MM7V3IEPw,939
44
44
  examples/openai_example/images_generate.py,sha256=SZNY8Visk7JUpx5QhNxTNINHmPAGdCUayF-Q7_iCr50,470
45
+ examples/openai_example/send_user_feedback.py,sha256=iPeKPYlO4nt0bbyeY4wCAjQJHFDouCalOEVHpd467LY,1028
45
46
  examples/openai_example/tool_calling.py,sha256=_IV7KoSI_37u1TTZWdVa58BYjkDfhSurvM86xwaNNhY,2316
46
47
  examples/openai_example/tool_calling_nonstreaming.py,sha256=Yc848IooZRXNynHL6z0kOgJ4qbmL_NOufcb2VmWRukI,3847
47
48
  examples/openai_example/tool_calling_streaming.py,sha256=mV1RbyAoVhumGRPpqPWQ6PMhnJyeifrlELd2-K1qJ_w,7015
@@ -54,13 +55,14 @@ examples/pinecone_example/__init__.py,sha256=_rvn7Ygt_QWMQoa5wB2GB0S9gZVrlJrPrEh
54
55
  examples/pinecone_example/basic.py,sha256=5MoHZMBxHMdC61oj-CP19gj9SxSvIcDrQL934JPZoQs,1549
55
56
  examples/qdrant_example/__init__.py,sha256=Ze9xEzW8FiHUO58YBa8JeHNOwcmo3dpYH77AkdyglKU,197
56
57
  examples/qdrant_example/basic.py,sha256=DCMjHSuBZKkhEjCkwy5d5La9WMyW0lCWqtcZWiFCEm4,1425
58
+ examples/routellm_example/basic.py,sha256=6XYfs9Wu2ty-Kv8yiC5U49qJuTNv728xWKQsImu3-ag,1054
57
59
  examples/vertexai_example/__init__.py,sha256=sEKULUwHdn-CJnbYs_jt4QPAUnM_fqwMBI3HJ1RBZco,83
58
60
  examples/vertexai_example/main.py,sha256=gndId5X5ksD-ycxnAWMdEqIDbLc3kz5Vt8vm4YPIk7I,5849
59
61
  examples/weaviate_example/__init__.py,sha256=8JMDBsRSEV10HfTd-YC7xb4txBjD3la56snk-Bbg2Kw,618
60
62
  examples/weaviate_example/query_text.py,sha256=sG8O-bXQpflBAiYpgE_M2X7GcHUlZNgl_wJW8_h-W6Q,127024
61
63
  langtrace_python_sdk/__init__.py,sha256=VZM6i71NR7pBQK6XvJWRelknuTYUhqwqE7PlicKa5Wg,1166
62
64
  langtrace_python_sdk/langtrace.py,sha256=1L0IjME-pzEYht92QfwByPZr3H1MClTrqQdoN1KyKJY,7689
63
- langtrace_python_sdk/version.py,sha256=ihs-OTG_m4F3lSAGofZ1X6UqOU41N4HD297yIDBaSZ0,22
65
+ langtrace_python_sdk/version.py,sha256=4yiQmg1jez9eDe7VvOU40EgTkcAYoip5MZXkPgQyf-I,22
64
66
  langtrace_python_sdk/constants/__init__.py,sha256=P8QvYwt5czUNDZsKS64vxm9Dc41ptGbuF1TFtAF6nv4,44
65
67
  langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=5MNjnAOg-4am78J3gVMH6FSwq5N8TOj72ugkhsw4vi0,46
66
68
  langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -78,17 +80,17 @@ langtrace_python_sdk/constants/instrumentation/vertexai.py,sha256=0s2vX3Y0iwjOPk
78
80
  langtrace_python_sdk/constants/instrumentation/weaviate.py,sha256=gtv-JBxvNGClEMxClmRKzjJ1khgOonsli4D_k9IagSE,2601
79
81
  langtrace_python_sdk/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
82
  langtrace_python_sdk/extensions/langtrace_exporter.py,sha256=gWVRU2DlB4xjZ4ww7M63DaLiAN5zQ2k1HPrythmjEdo,4202
81
- langtrace_python_sdk/extensions/langtrace_filesystem.py,sha256=qpnkpkuTZ2yhGgpBK64QJLt0T1iL-1zpEMPz4quJ_ng,6925
83
+ langtrace_python_sdk/extensions/langtrace_filesystem.py,sha256=34fZutG28EJ66l67OvTGsydAH3ZpXgikdE7hVLqBpG4,7863
82
84
  langtrace_python_sdk/instrumentation/__init__.py,sha256=yJd3aGu4kPfm2h6oe6kiCWvzTF9awpC1UztjXF9WSO4,1391
83
85
  langtrace_python_sdk/instrumentation/anthropic/__init__.py,sha256=donrurJAGYlxrSRA3BIf76jGeUcAx9Tq8CVpah68S0Y,101
84
86
  langtrace_python_sdk/instrumentation/anthropic/instrumentation.py,sha256=-srgE8qumAn0ulQYZxMa8ch-9IBH0XgBW_rfEnGk6LI,1684
85
- langtrace_python_sdk/instrumentation/anthropic/patch.py,sha256=Ol0U6vi5UG55ZC_Y7RBmuW87x0FCerAIbio0GSNjOqk,6914
87
+ langtrace_python_sdk/instrumentation/anthropic/patch.py,sha256=aii6bcdMQFfwsSbOKoMtqA3bCJdBW2GalD425H5bpvg,6819
86
88
  langtrace_python_sdk/instrumentation/chroma/__init__.py,sha256=pNZ5UO8Q-d5VkXSobBf79reB6AmEl_usnnTp5Itv818,95
87
89
  langtrace_python_sdk/instrumentation/chroma/instrumentation.py,sha256=nT6PS6bsrIOO9kLV5GuUeRjMe6THHHAZGvqWBP1dYog,1807
88
90
  langtrace_python_sdk/instrumentation/chroma/patch.py,sha256=JfFc8SDfwkEyIwTd1yM6jwa1vu5hZH6IXyxAEcQQQOs,9010
89
91
  langtrace_python_sdk/instrumentation/cohere/__init__.py,sha256=sGUSLdTUyYf36Tm6L5jQflhzCqvmWrhnBOMYHjvp6Hs,95
90
92
  langtrace_python_sdk/instrumentation/cohere/instrumentation.py,sha256=YQFHZIBd7SSPD4b6Va-ZR0thf_AuBCqj5yzHLHJVWnM,2121
91
- langtrace_python_sdk/instrumentation/cohere/patch.py,sha256=_0mmJ9eCjokkJTQTXWYK2hSd5XY02_iu5PW6HB6DvQI,21175
93
+ langtrace_python_sdk/instrumentation/cohere/patch.py,sha256=Qokp9qPTYwRvQzp3dTG2_g6r3EC3zJT1fujyJo30fXE,21080
92
94
  langtrace_python_sdk/instrumentation/crewai/__init__.py,sha256=_UBKfvQv7l0g2_wnmA5F6CdSAFH0atNOVPd49zsN3aM,88
93
95
  langtrace_python_sdk/instrumentation/crewai/instrumentation.py,sha256=q07x6nnig9JPxDT6ZylyIShfXWjNafKBetnNcA1UdEU,1836
94
96
  langtrace_python_sdk/instrumentation/crewai/patch.py,sha256=Vnpip9Pbk4UFbTFHoUrHtAnDgsaihwSvZBgtUeOtLr8,6109
@@ -100,7 +102,7 @@ langtrace_python_sdk/instrumentation/gemini/instrumentation.py,sha256=rhGOt1YsTm
100
102
  langtrace_python_sdk/instrumentation/gemini/patch.py,sha256=XtsxD9vbe4lv4o8K8iRb9K1-U8DrjtUG6rWCYkCdJuc,6315
101
103
  langtrace_python_sdk/instrumentation/groq/__init__.py,sha256=ZXeq_nrej6Lm_uoMFEg8wbSejhjB2UJ5IoHQBPc2-C0,91
102
104
  langtrace_python_sdk/instrumentation/groq/instrumentation.py,sha256=Ttf07XVKhdYY1_fqJc7QWiSdmgEhEVyQB_3Az2_wqYo,1832
103
- langtrace_python_sdk/instrumentation/groq/patch.py,sha256=y9WxhPfDmxGfAip1dL4vOAW3FTmFHKLMgPlZjK0m0js,23839
105
+ langtrace_python_sdk/instrumentation/groq/patch.py,sha256=WHCPnzbg5GYkW58gIWs8TbDsmri7HxHTk7m9LqdRfWM,23754
104
106
  langtrace_python_sdk/instrumentation/langchain/__init__.py,sha256=-7ZkqQFu64F-cxSFd1ZPrciODKqmUIyUbQQ-eHuQPyM,101
105
107
  langtrace_python_sdk/instrumentation/langchain/instrumentation.py,sha256=_Z4AeNb2hBPSCvMRxE-mUfmkUO_wP_tGGtu-jppWPiI,3462
106
108
  langtrace_python_sdk/instrumentation/langchain/patch.py,sha256=2ZgLdgQpvie4PtpVC068T3KUEBqcLQCRsdyThmKh7VQ,4089
@@ -118,7 +120,7 @@ langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py,sha256=8iAg-O
118
120
  langtrace_python_sdk/instrumentation/llamaindex/patch.py,sha256=OGk7ps438gW49zvJQCDp7ZmkQnFxouAUu2PvHbmcAP8,4496
119
121
  langtrace_python_sdk/instrumentation/ollama/__init__.py,sha256=g2zJsXnDHinXPzTc-WxDeTtHmr9gmAj3K6l_00kP8c8,82
120
122
  langtrace_python_sdk/instrumentation/ollama/instrumentation.py,sha256=jdsvkqUJAAUNLVPtAkn_rG26HXetVQXWtjn4a6eWZro,2029
121
- langtrace_python_sdk/instrumentation/ollama/patch.py,sha256=Twi3yeGgBj0DadBmZ0X0DsMPx71iSdL4R3OjOw3-p_E,8132
123
+ langtrace_python_sdk/instrumentation/ollama/patch.py,sha256=ky58NUyAETmaOqSAsB-LzDpoCosY6W54YeAJ9XftE-Q,7878
122
124
  langtrace_python_sdk/instrumentation/openai/__init__.py,sha256=VPHRNCQEdkizIVP2d0Uw_a7t8XOTSTprEIB8oboJFbs,95
123
125
  langtrace_python_sdk/instrumentation/openai/instrumentation.py,sha256=A0BJHRLcZ74TNVg6I0I9M5YWvSpAtXwMmME6N5CEQ_M,2945
124
126
  langtrace_python_sdk/instrumentation/openai/patch.py,sha256=T0g9BbUw5JWSupZbWCF6sQxO2Auj_oPpAFw0RdVkKLg,24075
@@ -135,15 +137,15 @@ langtrace_python_sdk/instrumentation/weaviate/__init__.py,sha256=Mc-Je6evPo-kKQz
135
137
  langtrace_python_sdk/instrumentation/weaviate/instrumentation.py,sha256=oWLCnh5_Nuw8bKpXJW6Zo-PpI_kJ7q2nA4BImnZ7YqY,2295
136
138
  langtrace_python_sdk/instrumentation/weaviate/patch.py,sha256=rRD6WfQcNGYpw9teoCkGPCZkzolG0h-mZdPGNKkgE10,5971
137
139
  langtrace_python_sdk/types/__init__.py,sha256=KDW6S74FDxpeBa9xoH5zVEYfmRjccCCHzlW7lTJg1TA,3194
138
- langtrace_python_sdk/utils/__init__.py,sha256=QPF7SMuiz_003fLCHkRrgNb9NjqErDQ5cQr6pkJReKc,724
140
+ langtrace_python_sdk/utils/__init__.py,sha256=SwYYPIh2AzEpI3zbwowQU2zJlwRwoVdWOCcrAKnkI9g,873
139
141
  langtrace_python_sdk/utils/langtrace_sampler.py,sha256=BupNndHbU9IL_wGleKetz8FdcveqHMBVz1bfKTTW80w,1753
140
- langtrace_python_sdk/utils/llm.py,sha256=bvJkU3IGt_ssx5taY_Dx5GkgxGJ9Jqc1CrKElMVJ5to,12983
142
+ langtrace_python_sdk/utils/llm.py,sha256=YLUqbHQWZwJBWtX2xyyiOXxfOkYdVFGSQmnMW6OEiYo,12852
141
143
  langtrace_python_sdk/utils/misc.py,sha256=CD9NWRLxLpFd0YwlHJqzlpFNedXVWtAKGOjQWnDCo8k,838
142
144
  langtrace_python_sdk/utils/prompt_registry.py,sha256=n5dQMVLBw8aJZY8Utvf67bncc25ELf6AH9BYw8_hSzo,2619
143
145
  langtrace_python_sdk/utils/sdk_version_checker.py,sha256=FzjIWZjn53cX0LEVPdipQd1fO9lG8iGVUEVUs9Hyk6M,1713
144
146
  langtrace_python_sdk/utils/silently_fail.py,sha256=F_9EteXCO9Cyq-8MA1OT2Zy_dx8n06nt31I7t7ui24E,478
145
147
  langtrace_python_sdk/utils/types.py,sha256=l-N6o7cnWUyrD6dBvW7W3Pf5CkPo5QaoT__k1XLbrQg,383
146
- langtrace_python_sdk/utils/with_root_span.py,sha256=RO-MhRUNSWdSo7KKOdAnTBfwj973KMTEKD-e54fSr0c,7539
148
+ langtrace_python_sdk/utils/with_root_span.py,sha256=2iWu8XD1NOFqSFgDZDJiMHZ1JB4HzmYPLr_F3Ugul2k,8480
147
149
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
148
150
  tests/conftest.py,sha256=0Jo6iCZTXbdvyJVhG9UpYGkLabL75378oauCzmt-Sa8,603
149
151
  tests/utils.py,sha256=8ZBYvxBH6PynipT1sqenfyjTGLhEV7SORQH1NJjnpsM,2500
@@ -186,8 +188,8 @@ tests/pinecone/cassettes/test_query.yaml,sha256=b5v9G3ssUy00oG63PlFUR3JErF2Js-5A
186
188
  tests/pinecone/cassettes/test_upsert.yaml,sha256=neWmQ1v3d03V8WoLl8FoFeeCYImb8pxlJBWnFd_lITU,38607
187
189
  tests/qdrant/conftest.py,sha256=9n0uHxxIjWk9fbYc4bx-uP8lSAgLBVx-cV9UjnsyCHM,381
188
190
  tests/qdrant/test_qdrant.py,sha256=pzjAjVY2kmsmGfrI2Gs2xrolfuaNHz7l1fqGQCjp5_o,3353
189
- langtrace_python_sdk-2.2.7.dist-info/METADATA,sha256=YHtbzww64LbwfyNm1bLXWgf43rV3NYYCJ18vQUVzg_4,14464
190
- langtrace_python_sdk-2.2.7.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
191
- langtrace_python_sdk-2.2.7.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
192
- langtrace_python_sdk-2.2.7.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
193
- langtrace_python_sdk-2.2.7.dist-info/RECORD,,
191
+ langtrace_python_sdk-2.2.9.dist-info/METADATA,sha256=awDVdeawZ8uvZro-f7KlAYL7A9JQmpFDC8U-Zfn14v8,14704
192
+ langtrace_python_sdk-2.2.9.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
193
+ langtrace_python_sdk-2.2.9.dist-info/entry_points.txt,sha256=1_b9-qvf2fE7uQNZcbUei9vLpFZBbbh9LrtGw95ssAo,70
194
+ langtrace_python_sdk-2.2.9.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
195
+ langtrace_python_sdk-2.2.9.dist-info/RECORD,,