opentelemetry-instrumentation-openai 0.28.1__tar.gz → 0.28.2__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.28.1 → opentelemetry_instrumentation_openai-0.28.2}/PKG-INFO +1 -1
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/opentelemetry/instrumentation/openai/shared/chat_wrappers.py +1 -1
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/opentelemetry/instrumentation/openai/shared/completion_wrappers.py +1 -1
- opentelemetry_instrumentation_openai-0.28.2/opentelemetry/instrumentation/openai/version.py +1 -0
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/pyproject.toml +1 -1
- opentelemetry_instrumentation_openai-0.28.1/opentelemetry/instrumentation/openai/version.py +0 -1
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/README.md +0 -0
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/opentelemetry/instrumentation/openai/__init__.py +0 -0
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/opentelemetry/instrumentation/openai/shared/__init__.py +0 -0
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/opentelemetry/instrumentation/openai/shared/config.py +0 -0
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py +0 -0
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/opentelemetry/instrumentation/openai/shared/image_gen_wrappers.py +0 -0
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/opentelemetry/instrumentation/openai/utils.py +0 -0
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/opentelemetry/instrumentation/openai/v0/__init__.py +0 -0
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/opentelemetry/instrumentation/openai/v1/__init__.py +0 -0
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/opentelemetry/instrumentation/openai/v1/assistant_wrappers.py +0 -0
- {opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/opentelemetry/instrumentation/openai/v1/event_handler_wrapper.py +0 -0
{opentelemetry_instrumentation_openai-0.28.1 → opentelemetry_instrumentation_openai-0.28.2}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: opentelemetry-instrumentation-openai
|
|
3
|
-
Version: 0.28.
|
|
3
|
+
Version: 0.28.2
|
|
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
|
|
@@ -446,7 +446,7 @@ def _set_streaming_token_metrics(
|
|
|
446
446
|
# setting the default model_name as gpt-4. As this uses the embedding "cl100k_base" that
|
|
447
447
|
# is used by most of the other model.
|
|
448
448
|
model_name = (
|
|
449
|
-
|
|
449
|
+
complete_response.get("model") or request_kwargs.get("model") or "gpt-4"
|
|
450
450
|
)
|
|
451
451
|
for msg in request_kwargs.get("messages"):
|
|
452
452
|
if msg.get("content"):
|
|
@@ -181,7 +181,7 @@ def _set_token_usage(span, request_kwargs, complete_response):
|
|
|
181
181
|
# prompt_usage
|
|
182
182
|
if request_kwargs and request_kwargs.get("prompt"):
|
|
183
183
|
prompt_content = request_kwargs.get("prompt")
|
|
184
|
-
model_name =
|
|
184
|
+
model_name = complete_response.get("model") or None
|
|
185
185
|
|
|
186
186
|
if model_name:
|
|
187
187
|
prompt_usage = get_token_count_from_string(prompt_content, model_name)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.28.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.28.1"
|
|
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
|