openlit 1.29.1__py3-none-any.whl → 1.29.2__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.
- openlit/instrumentation/openai/async_openai.py +183 -144
- {openlit-1.29.1.dist-info → openlit-1.29.2.dist-info}/METADATA +1 -1
- {openlit-1.29.1.dist-info → openlit-1.29.2.dist-info}/RECORD +5 -5
- {openlit-1.29.1.dist-info → openlit-1.29.2.dist-info}/LICENSE +0 -0
- {openlit-1.29.1.dist-info → openlit-1.29.2.dist-info}/WHEEL +0 -0
@@ -31,10 +31,179 @@ def async_chat_completions(gen_ai_endpoint, version, environment, application_na
|
|
31
31
|
A function that wraps the chat completions method to add telemetry.
|
32
32
|
"""
|
33
33
|
|
34
|
+
class TracedAsyncStream:
|
35
|
+
"""
|
36
|
+
Wrapper for streaming responses to collect metrics and trace data.
|
37
|
+
Wraps the 'openai.AsyncStream' response to collect message IDs and aggregated response.
|
38
|
+
|
39
|
+
This class implements the '__aiter__' and '__anext__' methods that
|
40
|
+
handle asynchronous streaming responses.
|
41
|
+
|
42
|
+
This class also implements '__aenter__' and '__aexit__' methods that
|
43
|
+
handle asynchronous context management protocol.
|
44
|
+
"""
|
45
|
+
def __init__(
|
46
|
+
self,
|
47
|
+
wrapped,
|
48
|
+
span,
|
49
|
+
*args,
|
50
|
+
**kwargs,
|
51
|
+
):
|
52
|
+
self.__wrapped__ = wrapped
|
53
|
+
self._span = span
|
54
|
+
# Placeholder for aggregating streaming response
|
55
|
+
self._llmresponse = ""
|
56
|
+
self._response_id = ""
|
57
|
+
|
58
|
+
self._args = args
|
59
|
+
self._kwargs = kwargs
|
60
|
+
|
61
|
+
async def __aenter__(self):
|
62
|
+
await self.__wrapped__.__aenter__()
|
63
|
+
return self
|
64
|
+
|
65
|
+
async def __aexit__(self, exc_type, exc_value, traceback):
|
66
|
+
await self.__wrapped__.__aexit__(exc_type, exc_value, traceback)
|
67
|
+
|
68
|
+
def __aiter__(self):
|
69
|
+
return self
|
70
|
+
|
71
|
+
async def __anext__(self):
|
72
|
+
try:
|
73
|
+
chunk = await self.__wrapped__.__anext__()
|
74
|
+
# Collect message IDs and aggregated response from events
|
75
|
+
if len(chunk.choices) > 0:
|
76
|
+
# pylint: disable=line-too-long
|
77
|
+
if hasattr(chunk.choices[0], "delta") and hasattr(chunk.choices[0].delta, "content"):
|
78
|
+
content = chunk.choices[0].delta.content
|
79
|
+
if content:
|
80
|
+
self._llmresponse += content
|
81
|
+
self._response_id = chunk.id
|
82
|
+
return chunk
|
83
|
+
except StopAsyncIteration:
|
84
|
+
# Handling exception ensure observability without disrupting operation
|
85
|
+
try:
|
86
|
+
# Format 'messages' into a single string
|
87
|
+
message_prompt = self._kwargs.get("messages", "")
|
88
|
+
formatted_messages = []
|
89
|
+
for message in message_prompt:
|
90
|
+
role = message["role"]
|
91
|
+
content = message["content"]
|
92
|
+
|
93
|
+
if isinstance(content, list):
|
94
|
+
content_str = ", ".join(
|
95
|
+
# pylint: disable=line-too-long
|
96
|
+
f'{item["type"]}: {item["text"] if "text" in item else item["image_url"]}'
|
97
|
+
if "type" in item else f'text: {item["text"]}'
|
98
|
+
for item in content
|
99
|
+
)
|
100
|
+
formatted_messages.append(f"{role}: {content_str}")
|
101
|
+
else:
|
102
|
+
formatted_messages.append(f"{role}: {content}")
|
103
|
+
prompt = "\n".join(formatted_messages)
|
104
|
+
|
105
|
+
# Calculate tokens using input prompt and aggregated response
|
106
|
+
prompt_tokens = openai_tokens(prompt,
|
107
|
+
self._kwargs.get("model", "gpt-3.5-turbo"))
|
108
|
+
completion_tokens = openai_tokens(self._llmresponse,
|
109
|
+
self._kwargs.get("model", "gpt-3.5-turbo"))
|
110
|
+
|
111
|
+
# Calculate cost of the operation
|
112
|
+
cost = get_chat_model_cost(self._kwargs.get("model", "gpt-3.5-turbo"),
|
113
|
+
pricing_info, prompt_tokens,
|
114
|
+
completion_tokens)
|
115
|
+
|
116
|
+
# Set Span attributes
|
117
|
+
self._span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
118
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
119
|
+
SemanticConvetion.GEN_AI_SYSTEM_OPENAI)
|
120
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
|
121
|
+
SemanticConvetion.GEN_AI_TYPE_CHAT)
|
122
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
123
|
+
gen_ai_endpoint)
|
124
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_RESPONSE_ID,
|
125
|
+
self._response_id)
|
126
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
127
|
+
environment)
|
128
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
|
129
|
+
application_name)
|
130
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_MODEL,
|
131
|
+
self._kwargs.get("model", "gpt-3.5-turbo"))
|
132
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_USER,
|
133
|
+
self._kwargs.get("user", ""))
|
134
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_TOP_P,
|
135
|
+
self._kwargs.get("top_p", 1.0))
|
136
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_MAX_TOKENS,
|
137
|
+
self._kwargs.get("max_tokens", -1))
|
138
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_TEMPERATURE,
|
139
|
+
self._kwargs.get("temperature", 1.0))
|
140
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_PRESENCE_PENALTY,
|
141
|
+
self._kwargs.get("presence_penalty", 0.0))
|
142
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_FREQUENCY_PENALTY,
|
143
|
+
self._kwargs.get("frequency_penalty", 0.0))
|
144
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_SEED,
|
145
|
+
self._kwargs.get("seed", ""))
|
146
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
147
|
+
True)
|
148
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
|
149
|
+
prompt_tokens)
|
150
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
|
151
|
+
completion_tokens)
|
152
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
153
|
+
prompt_tokens + completion_tokens)
|
154
|
+
self._span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COST,
|
155
|
+
cost)
|
156
|
+
if trace_content:
|
157
|
+
self._span.add_event(
|
158
|
+
name=SemanticConvetion.GEN_AI_CONTENT_PROMPT_EVENT,
|
159
|
+
attributes={
|
160
|
+
SemanticConvetion.GEN_AI_CONTENT_PROMPT: prompt,
|
161
|
+
},
|
162
|
+
)
|
163
|
+
self._span.add_event(
|
164
|
+
name=SemanticConvetion.GEN_AI_CONTENT_COMPLETION_EVENT,
|
165
|
+
attributes={
|
166
|
+
SemanticConvetion.GEN_AI_CONTENT_COMPLETION: self._llmresponse,
|
167
|
+
},
|
168
|
+
)
|
169
|
+
|
170
|
+
self._span.set_status(Status(StatusCode.OK))
|
171
|
+
|
172
|
+
if disable_metrics is False:
|
173
|
+
attributes = {
|
174
|
+
TELEMETRY_SDK_NAME:
|
175
|
+
"openlit",
|
176
|
+
SemanticConvetion.GEN_AI_APPLICATION_NAME:
|
177
|
+
application_name,
|
178
|
+
SemanticConvetion.GEN_AI_SYSTEM:
|
179
|
+
SemanticConvetion.GEN_AI_SYSTEM_OPENAI,
|
180
|
+
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
181
|
+
environment,
|
182
|
+
SemanticConvetion.GEN_AI_TYPE:
|
183
|
+
SemanticConvetion.GEN_AI_TYPE_CHAT,
|
184
|
+
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
185
|
+
self._kwargs.get("model", "gpt-3.5-turbo")
|
186
|
+
}
|
187
|
+
|
188
|
+
metrics["genai_requests"].add(1, attributes)
|
189
|
+
metrics["genai_total_tokens"].add(
|
190
|
+
prompt_tokens + completion_tokens, attributes
|
191
|
+
)
|
192
|
+
metrics["genai_completion_tokens"].add(completion_tokens, attributes)
|
193
|
+
metrics["genai_prompt_tokens"].add(prompt_tokens, attributes)
|
194
|
+
metrics["genai_cost"].record(cost, attributes)
|
195
|
+
|
196
|
+
except Exception as e:
|
197
|
+
handle_exception(self._span, e)
|
198
|
+
logger.error("Error in trace creation: %s", e)
|
199
|
+
finally:
|
200
|
+
self._span.end()
|
201
|
+
raise
|
202
|
+
|
34
203
|
async def wrapper(wrapped, instance, args, kwargs):
|
35
204
|
"""
|
36
205
|
Wraps the 'chat.completions' API call to add telemetry.
|
37
|
-
|
206
|
+
|
38
207
|
This collects metrics such as execution time, cost, and token usage, and handles errors
|
39
208
|
gracefully, adding details to the trace for observability.
|
40
209
|
|
@@ -54,140 +223,10 @@ def async_chat_completions(gen_ai_endpoint, version, environment, application_na
|
|
54
223
|
# pylint: disable=no-else-return
|
55
224
|
if streaming:
|
56
225
|
# Special handling for streaming response to accommodate the nature of data flow
|
57
|
-
|
58
|
-
|
59
|
-
# Placeholder for aggregating streaming response
|
60
|
-
llmresponse = ""
|
61
|
-
|
62
|
-
# Loop through streaming events capturing relevant details
|
63
|
-
async for chunk in await wrapped(*args, **kwargs):
|
64
|
-
# Collect message IDs and aggregated response from events
|
65
|
-
if len(chunk.choices) > 0:
|
66
|
-
# pylint: disable=line-too-long
|
67
|
-
if hasattr(chunk.choices[0], "delta") and hasattr(chunk.choices[0].delta, "content"):
|
68
|
-
content = chunk.choices[0].delta.content
|
69
|
-
if content:
|
70
|
-
llmresponse += content
|
71
|
-
yield chunk
|
72
|
-
response_id = chunk.id
|
73
|
-
|
74
|
-
# Handling exception ensure observability without disrupting operation
|
75
|
-
try:
|
76
|
-
# Format 'messages' into a single string
|
77
|
-
message_prompt = kwargs.get("messages", "")
|
78
|
-
formatted_messages = []
|
79
|
-
for message in message_prompt:
|
80
|
-
role = message["role"]
|
81
|
-
content = message["content"]
|
82
|
-
|
83
|
-
if isinstance(content, list):
|
84
|
-
content_str = ", ".join(
|
85
|
-
# pylint: disable=line-too-long
|
86
|
-
f'{item["type"]}: {item["text"] if "text" in item else item["image_url"]}'
|
87
|
-
if "type" in item else f'text: {item["text"]}'
|
88
|
-
for item in content
|
89
|
-
)
|
90
|
-
formatted_messages.append(f"{role}: {content_str}")
|
91
|
-
else:
|
92
|
-
formatted_messages.append(f"{role}: {content}")
|
93
|
-
prompt = "\n".join(formatted_messages)
|
94
|
-
|
95
|
-
# Calculate tokens using input prompt and aggregated response
|
96
|
-
prompt_tokens = openai_tokens(prompt,
|
97
|
-
kwargs.get("model", "gpt-3.5-turbo"))
|
98
|
-
completion_tokens = openai_tokens(llmresponse,
|
99
|
-
kwargs.get("model", "gpt-3.5-turbo"))
|
226
|
+
awaited_wrapped = await wrapped(*args, **kwargs)
|
227
|
+
span = tracer.start_span(gen_ai_endpoint, kind=SpanKind.CLIENT)
|
100
228
|
|
101
|
-
|
102
|
-
cost = get_chat_model_cost(kwargs.get("model", "gpt-3.5-turbo"),
|
103
|
-
pricing_info, prompt_tokens,
|
104
|
-
completion_tokens)
|
105
|
-
|
106
|
-
# Set Span attributes
|
107
|
-
span.set_attribute(TELEMETRY_SDK_NAME, "openlit")
|
108
|
-
span.set_attribute(SemanticConvetion.GEN_AI_SYSTEM,
|
109
|
-
SemanticConvetion.GEN_AI_SYSTEM_OPENAI)
|
110
|
-
span.set_attribute(SemanticConvetion.GEN_AI_TYPE,
|
111
|
-
SemanticConvetion.GEN_AI_TYPE_CHAT)
|
112
|
-
span.set_attribute(SemanticConvetion.GEN_AI_ENDPOINT,
|
113
|
-
gen_ai_endpoint)
|
114
|
-
span.set_attribute(SemanticConvetion.GEN_AI_RESPONSE_ID,
|
115
|
-
response_id)
|
116
|
-
span.set_attribute(SemanticConvetion.GEN_AI_ENVIRONMENT,
|
117
|
-
environment)
|
118
|
-
span.set_attribute(SemanticConvetion.GEN_AI_APPLICATION_NAME,
|
119
|
-
application_name)
|
120
|
-
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_MODEL,
|
121
|
-
kwargs.get("model", "gpt-3.5-turbo"))
|
122
|
-
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_USER,
|
123
|
-
kwargs.get("user", ""))
|
124
|
-
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_TOP_P,
|
125
|
-
kwargs.get("top_p", 1.0))
|
126
|
-
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_MAX_TOKENS,
|
127
|
-
kwargs.get("max_tokens", -1))
|
128
|
-
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_TEMPERATURE,
|
129
|
-
kwargs.get("temperature", 1.0))
|
130
|
-
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_PRESENCE_PENALTY,
|
131
|
-
kwargs.get("presence_penalty", 0.0))
|
132
|
-
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_FREQUENCY_PENALTY,
|
133
|
-
kwargs.get("frequency_penalty", 0.0))
|
134
|
-
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_SEED,
|
135
|
-
kwargs.get("seed", ""))
|
136
|
-
span.set_attribute(SemanticConvetion.GEN_AI_REQUEST_IS_STREAM,
|
137
|
-
True)
|
138
|
-
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_PROMPT_TOKENS,
|
139
|
-
prompt_tokens)
|
140
|
-
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COMPLETION_TOKENS,
|
141
|
-
completion_tokens)
|
142
|
-
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_TOTAL_TOKENS,
|
143
|
-
prompt_tokens + completion_tokens)
|
144
|
-
span.set_attribute(SemanticConvetion.GEN_AI_USAGE_COST,
|
145
|
-
cost)
|
146
|
-
if trace_content:
|
147
|
-
span.add_event(
|
148
|
-
name=SemanticConvetion.GEN_AI_CONTENT_PROMPT_EVENT,
|
149
|
-
attributes={
|
150
|
-
SemanticConvetion.GEN_AI_CONTENT_PROMPT: prompt,
|
151
|
-
},
|
152
|
-
)
|
153
|
-
span.add_event(
|
154
|
-
name=SemanticConvetion.GEN_AI_CONTENT_COMPLETION_EVENT,
|
155
|
-
attributes={
|
156
|
-
SemanticConvetion.GEN_AI_CONTENT_COMPLETION: llmresponse,
|
157
|
-
},
|
158
|
-
)
|
159
|
-
|
160
|
-
span.set_status(Status(StatusCode.OK))
|
161
|
-
|
162
|
-
if disable_metrics is False:
|
163
|
-
attributes = {
|
164
|
-
TELEMETRY_SDK_NAME:
|
165
|
-
"openlit",
|
166
|
-
SemanticConvetion.GEN_AI_APPLICATION_NAME:
|
167
|
-
application_name,
|
168
|
-
SemanticConvetion.GEN_AI_SYSTEM:
|
169
|
-
SemanticConvetion.GEN_AI_SYSTEM_OPENAI,
|
170
|
-
SemanticConvetion.GEN_AI_ENVIRONMENT:
|
171
|
-
environment,
|
172
|
-
SemanticConvetion.GEN_AI_TYPE:
|
173
|
-
SemanticConvetion.GEN_AI_TYPE_CHAT,
|
174
|
-
SemanticConvetion.GEN_AI_REQUEST_MODEL:
|
175
|
-
kwargs.get("model", "gpt-3.5-turbo")
|
176
|
-
}
|
177
|
-
|
178
|
-
metrics["genai_requests"].add(1, attributes)
|
179
|
-
metrics["genai_total_tokens"].add(
|
180
|
-
prompt_tokens + completion_tokens, attributes
|
181
|
-
)
|
182
|
-
metrics["genai_completion_tokens"].add(completion_tokens, attributes)
|
183
|
-
metrics["genai_prompt_tokens"].add(prompt_tokens, attributes)
|
184
|
-
metrics["genai_cost"].record(cost, attributes)
|
185
|
-
|
186
|
-
except Exception as e:
|
187
|
-
handle_exception(span, e)
|
188
|
-
logger.error("Error in trace creation: %s", e)
|
189
|
-
|
190
|
-
return stream_generator()
|
229
|
+
return TracedAsyncStream(awaited_wrapped, span)
|
191
230
|
|
192
231
|
# Handling for non-streaming responses
|
193
232
|
else:
|
@@ -363,7 +402,7 @@ def async_embedding(gen_ai_endpoint, version, environment, application_name,
|
|
363
402
|
tracer, pricing_info, trace_content, metrics, disable_metrics):
|
364
403
|
"""
|
365
404
|
Generates a telemetry wrapper for embeddings to collect metrics.
|
366
|
-
|
405
|
+
|
367
406
|
Args:
|
368
407
|
gen_ai_endpoint: Endpoint identifier for logging and tracing.
|
369
408
|
version: Version of the monitoring package.
|
@@ -372,7 +411,7 @@ def async_embedding(gen_ai_endpoint, version, environment, application_name,
|
|
372
411
|
tracer: OpenTelemetry tracer for creating spans.
|
373
412
|
pricing_info: Information used for calculating the cost of OpenAI usage.
|
374
413
|
trace_content: Flag indicating whether to trace the actual content.
|
375
|
-
|
414
|
+
|
376
415
|
Returns:
|
377
416
|
A function that wraps the embeddings method to add telemetry.
|
378
417
|
"""
|
@@ -475,7 +514,7 @@ def async_finetune(gen_ai_endpoint, version, environment, application_name,
|
|
475
514
|
tracer, pricing_info, trace_content, metrics, disable_metrics):
|
476
515
|
"""
|
477
516
|
Generates a telemetry wrapper for fine-tuning jobs to collect metrics.
|
478
|
-
|
517
|
+
|
479
518
|
Args:
|
480
519
|
gen_ai_endpoint: Endpoint identifier for logging and tracing.
|
481
520
|
version: Version of the monitoring package.
|
@@ -484,7 +523,7 @@ def async_finetune(gen_ai_endpoint, version, environment, application_name,
|
|
484
523
|
tracer: OpenTelemetry tracer for creating spans.
|
485
524
|
pricing_info: Information used for calculating the cost of OpenAI usage.
|
486
525
|
trace_content: Flag indicating whether to trace the actual content.
|
487
|
-
|
526
|
+
|
488
527
|
Returns:
|
489
528
|
A function that wraps the fine tuning creation method to add telemetry.
|
490
529
|
"""
|
@@ -564,7 +603,7 @@ def async_image_generate(gen_ai_endpoint, version, environment, application_name
|
|
564
603
|
tracer, pricing_info, trace_content, metrics, disable_metrics):
|
565
604
|
"""
|
566
605
|
Generates a telemetry wrapper for image generation to collect metrics.
|
567
|
-
|
606
|
+
|
568
607
|
Args:
|
569
608
|
gen_ai_endpoint: Endpoint identifier for logging and tracing.
|
570
609
|
version: Version of the monitoring package.
|
@@ -573,7 +612,7 @@ def async_image_generate(gen_ai_endpoint, version, environment, application_name
|
|
573
612
|
tracer: OpenTelemetry tracer for creating spans.
|
574
613
|
pricing_info: Information used for calculating the cost of OpenAI image generation.
|
575
614
|
trace_content: Flag indicating whether to trace the input prompt and generated images.
|
576
|
-
|
615
|
+
|
577
616
|
Returns:
|
578
617
|
A function that wraps the image generation method to add telemetry.
|
579
618
|
"""
|
@@ -694,7 +733,7 @@ def async_image_variatons(gen_ai_endpoint, version, environment, application_nam
|
|
694
733
|
tracer, pricing_info, trace_content, metrics, disable_metrics):
|
695
734
|
"""
|
696
735
|
Generates a telemetry wrapper for creating image variations to collect metrics.
|
697
|
-
|
736
|
+
|
698
737
|
Args:
|
699
738
|
gen_ai_endpoint: Endpoint identifier for logging and tracing.
|
700
739
|
version: Version of the monitoring package.
|
@@ -703,7 +742,7 @@ def async_image_variatons(gen_ai_endpoint, version, environment, application_nam
|
|
703
742
|
tracer: OpenTelemetry tracer for creating spans.
|
704
743
|
pricing_info: Information used for calculating the cost of generating image variations.
|
705
744
|
trace_content: Flag indicating whether to trace the input image and generated variations.
|
706
|
-
|
745
|
+
|
707
746
|
Returns:
|
708
747
|
A function that wraps the image variations creation method to add telemetry.
|
709
748
|
"""
|
@@ -813,7 +852,7 @@ def async_audio_create(gen_ai_endpoint, version, environment, application_name,
|
|
813
852
|
tracer, pricing_info, trace_content, metrics, disable_metrics):
|
814
853
|
"""
|
815
854
|
Generates a telemetry wrapper for creating speech audio to collect metrics.
|
816
|
-
|
855
|
+
|
817
856
|
Args:
|
818
857
|
gen_ai_endpoint: Endpoint identifier for logging and tracing.
|
819
858
|
version: Version of the monitoring package.
|
@@ -822,7 +861,7 @@ def async_audio_create(gen_ai_endpoint, version, environment, application_name,
|
|
822
861
|
tracer: OpenTelemetry tracer for creating spans.
|
823
862
|
pricing_info: Information used for calculating the cost of generating speech audio.
|
824
863
|
trace_content: Flag indicating whether to trace the input text and generated audio.
|
825
|
-
|
864
|
+
|
826
865
|
Returns:
|
827
866
|
A function that wraps the speech audio creation method to add telemetry.
|
828
867
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: openlit
|
3
|
-
Version: 1.29.
|
3
|
+
Version: 1.29.2
|
4
4
|
Summary: OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications and GPUs, facilitating the integration of observability into your GenAI-driven projects
|
5
5
|
Home-page: https://github.com/openlit/openlit/tree/main/openlit/python
|
6
6
|
Keywords: OpenTelemetry,otel,otlp,llm,tracing,openai,anthropic,claude,cohere,llm monitoring,observability,monitoring,gpt,Generative AI,chatGPT,gpu
|
@@ -54,7 +54,7 @@ openlit/instrumentation/ollama/async_ollama.py,sha256=7lbikD-I9k8VL63idqj3VMEfiE
|
|
54
54
|
openlit/instrumentation/ollama/ollama.py,sha256=lBt1d3rFnF1tFbfdOccwjEafHnmTAUGsiOKSHku6Fkw,31277
|
55
55
|
openlit/instrumentation/openai/__init__.py,sha256=AZ2cPr3TMKkgGdMl_yXMeSi7bWhtmMqOW1iHdzHHGHA,16265
|
56
56
|
openlit/instrumentation/openai/async_azure_openai.py,sha256=XbST1UE_zXzNL6RX2XwCsK_a6IhG9PHVTMKBjGrUcB0,48961
|
57
|
-
openlit/instrumentation/openai/async_openai.py,sha256=
|
57
|
+
openlit/instrumentation/openai/async_openai.py,sha256=WzGsROOC6IAlJ73OL48YYeXib1YzXODzhO8Z608vfhU,48491
|
58
58
|
openlit/instrumentation/openai/azure_openai.py,sha256=dZUc5MtCwg_sZJWiruG6exYGhPAm-339sqs3sKZNRPU,48761
|
59
59
|
openlit/instrumentation/openai/openai.py,sha256=pOeehRgd0GMITGMYUU6PUsjvPDUWmF-L_ER9ry1hL_c,48214
|
60
60
|
openlit/instrumentation/pinecone/__init__.py,sha256=Mv9bElqNs07_JQkYyNnO0wOM3hdbprmw7sttdMeKC7g,2526
|
@@ -72,7 +72,7 @@ openlit/instrumentation/vllm/vllm.py,sha256=lDzM7F5pgxvh8nKL0dcKB4TD0Mc9wXOWeXOs
|
|
72
72
|
openlit/otel/metrics.py,sha256=FYAk4eBAmNtFKUIp4hbRbpdq4LME6MapyCQOIeuhmEg,4337
|
73
73
|
openlit/otel/tracing.py,sha256=2kSj7n7uXSkRegcGFDC8IbnDOxqWTA8dGODs__Yn_yA,3719
|
74
74
|
openlit/semcov/__init__.py,sha256=xPsw1aPonDSGYVuga-ZdoGt4yyA16wNFi5AEc7_xIrQ,8114
|
75
|
-
openlit-1.29.
|
76
|
-
openlit-1.29.
|
77
|
-
openlit-1.29.
|
78
|
-
openlit-1.29.
|
75
|
+
openlit-1.29.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
76
|
+
openlit-1.29.2.dist-info/METADATA,sha256=PYgpgLooRPP7jvQuo7MO5loiRNYmdBv84kNd44U40gM,20806
|
77
|
+
openlit-1.29.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
78
|
+
openlit-1.29.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|