What is the expected type structure for chat messages? The manual instrumentation example uses a generator like kind of strutctures that abstracts away the type structure of the arguments; this makes it very hard to understand what is expected? I have failed to instrument succesfully this part of my app
the generator is equivalent to this
for messages_index, message in enumerate(messages):
span.set_attribute(f"{SpanAttributes.LLM_INPUT_MESSAGES}.{messages_index}.{MessageAttributes.MESSAGE_ROLE}", message.role)
span.set_attribute(f"{SpanAttributes.LLM_INPUT_MESSAGES}.{messages_index}.{MessageAttributes.MESSAGE_CONTENT}", message.content)Hello! I also had a similar question about docs earlier as well. Are the answers to these kinds of questions documented anywhere specific besides the actual code that I may have missed? Perhaps I need to do some more reading into just OpenTelemetry? etc. Want to make sure I exhaust all documentation!
Hey Trantor D., the definitive place to look is the OpenInference spec, specifically the semantic conventions.
Wow! Excellent! I had seen this before but I guess I forgot! This is exactly what I needed for manual instrumentation question previously - thanks!
In the semantic convention input_messages are stored this way
Thanks for flagging.
