fix otel - handle vision images content

This commit is contained in:
Ishaan Jaff 2024-06-08 14:12:00 -07:00
parent 259540900b
commit 1ff99bf9b5

View file

@ -302,6 +302,8 @@ class OpenTelemetry(CustomLogger):
)
if prompt.get("content"):
if not isinstance(prompt.get("content"), str):
prompt["content"] = str(prompt.get("content"))
span.set_attribute(
f"{SpanAttributes.LLM_PROMPTS}.{idx}.content",
prompt.get("content"),