You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using opentelemetry-instrumentation-openai-v2, I receive the following warning when setting the response_format parameter as a dictionary:
WARNING:opentelemetry.attributes:Invalid type dict for attribute 'gen_ai.openai.request.response_format' value. Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or a sequence of those types\
The OpenAI Python Client and API Reference indicate that response_format can be a dictionary with a key "type" (values: "text", "json_object", "json_schema"). However, the OpenTelemetry Semantic Conventions specify that this attribute should be a plain string.
The current implementation attempts to log the entire dictionary, causing a type mismatch. The relevant code can be found
When using opentelemetry-instrumentation-openai-v2, I receive the following warning when setting the response_format parameter as a dictionary:
The OpenAI Python Client and API Reference indicate that response_format can be a dictionary with a key "type" (values: "text", "json_object", "json_schema"). However, the OpenTelemetry Semantic Conventions specify that this attribute should be a plain string.
The current implementation attempts to log the entire dictionary, causing a type mismatch. The relevant code can be found
opentelemetry-python-contrib/instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/utils.py
Lines 205 to 207 in d330ab3
The text was updated successfully, but these errors were encountered: