opentelemetry-instrumentation-openai 0.18.0__py3-none-any.whl → 0.18.1__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.
Potentially problematic release.
This version of opentelemetry-instrumentation-openai might be problematic. Click here for more details.
- opentelemetry/instrumentation/openai/shared/chat_wrappers.py +7 -2
- opentelemetry/instrumentation/openai/version.py +1 -1
- {opentelemetry_instrumentation_openai-0.18.0.dist-info → opentelemetry_instrumentation_openai-0.18.1.dist-info}/METADATA +1 -1
- {opentelemetry_instrumentation_openai-0.18.0.dist-info → opentelemetry_instrumentation_openai-0.18.1.dist-info}/RECORD +6 -6
- {opentelemetry_instrumentation_openai-0.18.0.dist-info → opentelemetry_instrumentation_openai-0.18.1.dist-info}/WHEEL +0 -0
- {opentelemetry_instrumentation_openai-0.18.0.dist-info → opentelemetry_instrumentation_openai-0.18.1.dist-info}/entry_points.txt +0 -0
|
@@ -242,6 +242,7 @@ def _set_chat_metrics(
|
|
|
242
242
|
shared_attributes = {
|
|
243
243
|
"gen_ai.response.model": response_dict.get("model") or None,
|
|
244
244
|
"server.address": _get_openai_base_url(instance),
|
|
245
|
+
"stream": False,
|
|
245
246
|
}
|
|
246
247
|
|
|
247
248
|
# token metrics
|
|
@@ -356,7 +357,9 @@ def _set_streaming_token_metrics(
|
|
|
356
357
|
# prompt_usage
|
|
357
358
|
if request_kwargs and request_kwargs.get("messages"):
|
|
358
359
|
prompt_content = ""
|
|
359
|
-
model_name
|
|
360
|
+
# setting the default model_name as gpt-4. As this uses the embedding "cl100k_base" that
|
|
361
|
+
# is used by most of the other model.
|
|
362
|
+
model_name = request_kwargs.get("model") or complete_response.get("model") or "gpt-4"
|
|
360
363
|
for msg in request_kwargs.get("messages"):
|
|
361
364
|
if msg.get("content"):
|
|
362
365
|
prompt_content += msg.get("content")
|
|
@@ -366,7 +369,9 @@ def _set_streaming_token_metrics(
|
|
|
366
369
|
# completion_usage
|
|
367
370
|
if complete_response.get("choices"):
|
|
368
371
|
completion_content = ""
|
|
369
|
-
model_name
|
|
372
|
+
# setting the default model_name as gpt-4. As this uses the embedding "cl100k_base" that
|
|
373
|
+
# is used by most of the other model.
|
|
374
|
+
model_name = complete_response.get("model") or "gpt-4"
|
|
370
375
|
|
|
371
376
|
for choice in complete_response.get("choices"):
|
|
372
377
|
if choice.get("message") and choice.get("message").get("content"):
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.18.
|
|
1
|
+
__version__ = "0.18.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: opentelemetry-instrumentation-openai
|
|
3
|
-
Version: 0.18.
|
|
3
|
+
Version: 0.18.1
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
opentelemetry/instrumentation/openai/__init__.py,sha256=xl3Kvqry9glVhu8VtdknfUE9FpXQ7KWAFqtVlpjE-40,1344
|
|
2
2
|
opentelemetry/instrumentation/openai/shared/__init__.py,sha256=eBVYPw2Zh28p9wak6Ncba3jSt-bdIgJjzJrad6snCxo,7359
|
|
3
|
-
opentelemetry/instrumentation/openai/shared/chat_wrappers.py,sha256=
|
|
3
|
+
opentelemetry/instrumentation/openai/shared/chat_wrappers.py,sha256=YNYsWu3Q01iVtGg0FyQJHdKlsobDgZttyM2vb-dX1qA,16959
|
|
4
4
|
opentelemetry/instrumentation/openai/shared/completion_wrappers.py,sha256=-JHfgyxic5I3Wr3Uc_L-U7ztDVFcyovtF37tNLtaW3s,6604
|
|
5
5
|
opentelemetry/instrumentation/openai/shared/config.py,sha256=5uekQEnmYo1o6tsTD2IGc-cVmHUo5KmUC4pOVdrFFNk,102
|
|
6
6
|
opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py,sha256=6I6I98T1a5Np0ZjcGZQbId4ZyEmMI6o9wVm8qoRpO9o,6595
|
|
@@ -10,8 +10,8 @@ opentelemetry/instrumentation/openai/v0/__init__.py,sha256=ngmmYyfTwRQSjTZAvNpBI
|
|
|
10
10
|
opentelemetry/instrumentation/openai/v1/__init__.py,sha256=6XHk11JhkpZixgMDsjb0b-efd8LlBTG0jjMCyf0fOSo,8652
|
|
11
11
|
opentelemetry/instrumentation/openai/v1/assistant_wrappers.py,sha256=T6Vtdp1fAZdcYjGiTMZwkn4F4DgsltD4p4xLEFW-GhI,5874
|
|
12
12
|
opentelemetry/instrumentation/openai/v1/event_handler_wrapper.py,sha256=SAzYoun2yyOloofyOWtxpm8E2M9TL3Nm8TgKdNyXHuY,2779
|
|
13
|
-
opentelemetry/instrumentation/openai/version.py,sha256=
|
|
14
|
-
opentelemetry_instrumentation_openai-0.18.
|
|
15
|
-
opentelemetry_instrumentation_openai-0.18.
|
|
16
|
-
opentelemetry_instrumentation_openai-0.18.
|
|
17
|
-
opentelemetry_instrumentation_openai-0.18.
|
|
13
|
+
opentelemetry/instrumentation/openai/version.py,sha256=i8LHPc0qiYueFP9CAFrtufkGZfMfDAhFNqWW_Pa8HsI,23
|
|
14
|
+
opentelemetry_instrumentation_openai-0.18.1.dist-info/METADATA,sha256=oOv0_QxzULUUEaa40JQzn8RiZirSXFMtRaheOIyXTlo,2255
|
|
15
|
+
opentelemetry_instrumentation_openai-0.18.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
16
|
+
opentelemetry_instrumentation_openai-0.18.1.dist-info/entry_points.txt,sha256=vTBfiX5yXji5YHikuJHEOoBZ1TFdPQ1EI4ctd2pZSeE,93
|
|
17
|
+
opentelemetry_instrumentation_openai-0.18.1.dist-info/RECORD,,
|
|
File without changes
|