opentelemetry-instrumentation-openai 0.25.4__tar.gz → 0.25.5__tar.gz
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.
Potentially problematic release.
This version of opentelemetry-instrumentation-openai might be problematic. Click here for more details.
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/PKG-INFO +1 -1
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/opentelemetry/instrumentation/openai/shared/chat_wrappers.py +22 -6
- opentelemetry_instrumentation_openai-0.25.5/opentelemetry/instrumentation/openai/version.py +1 -0
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/pyproject.toml +1 -1
- opentelemetry_instrumentation_openai-0.25.4/opentelemetry/instrumentation/openai/version.py +0 -1
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/README.md +0 -0
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/opentelemetry/instrumentation/openai/__init__.py +0 -0
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/opentelemetry/instrumentation/openai/shared/__init__.py +0 -0
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/opentelemetry/instrumentation/openai/shared/completion_wrappers.py +0 -0
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/opentelemetry/instrumentation/openai/shared/config.py +0 -0
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py +0 -0
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/opentelemetry/instrumentation/openai/shared/image_gen_wrappers.py +0 -0
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/opentelemetry/instrumentation/openai/utils.py +0 -0
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/opentelemetry/instrumentation/openai/v0/__init__.py +0 -0
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/opentelemetry/instrumentation/openai/v1/__init__.py +0 -0
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/opentelemetry/instrumentation/openai/v1/assistant_wrappers.py +0 -0
- {opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/opentelemetry/instrumentation/openai/v1/event_handler_wrapper.py +0 -0
{opentelemetry_instrumentation_openai-0.25.4 → opentelemetry_instrumentation_openai-0.25.5}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: opentelemetry-instrumentation-openai
|
|
3
|
-
Version: 0.25.
|
|
3
|
+
Version: 0.25.5
|
|
4
4
|
Summary: OpenTelemetry OpenAI instrumentation
|
|
5
5
|
Home-page: https://github.com/traceloop/openllmetry/tree/main/packages/opentelemetry-instrumentation-openai
|
|
6
6
|
License: Apache-2.0
|
|
@@ -336,12 +336,28 @@ def _set_prompts(span, messages):
|
|
|
336
336
|
if isinstance(content, list):
|
|
337
337
|
content = json.dumps(content)
|
|
338
338
|
_set_span_attribute(span, f"{prefix}.content", content)
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
339
|
+
tool_calls = msg.get("tool_calls")
|
|
340
|
+
if tool_calls:
|
|
341
|
+
for i, tool_call in enumerate(tool_calls):
|
|
342
|
+
if is_openai_v1():
|
|
343
|
+
tool_call = model_as_dict(tool_call)
|
|
344
|
+
|
|
345
|
+
function = tool_call.get("function")
|
|
346
|
+
_set_span_attribute(
|
|
347
|
+
span,
|
|
348
|
+
f"{prefix}.tool_calls.{i}.id",
|
|
349
|
+
tool_call.get("id"),
|
|
350
|
+
)
|
|
351
|
+
_set_span_attribute(
|
|
352
|
+
span,
|
|
353
|
+
f"{prefix}.tool_calls.{i}.name",
|
|
354
|
+
function.get("name"),
|
|
355
|
+
)
|
|
356
|
+
_set_span_attribute(
|
|
357
|
+
span,
|
|
358
|
+
f"{prefix}.tool_calls.{i}.arguments",
|
|
359
|
+
function.get("arguments"),
|
|
360
|
+
)
|
|
345
361
|
|
|
346
362
|
|
|
347
363
|
def _set_completions(span, choices):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.25.5"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.25.4"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|