Hello! Sorry for diving right in I am building a custom chatbot. I want to display my chat history like the image --> each turn is a separate widget under Inputs. Right now, I use span.set_attribute("user", {"content": "some content"}) but all I get is a json in info tab. Any suggestions please? (image from smolagents usage)
馃挕聽Hint: Mention RunLLM in the thread for followups.
Thanks 馃敀[private user] for responding quickly! Yes, I want this to look like an input dropdown. Do I use "llm.input_messages" key in
span.set_attribute(
"llm.input_messages",
[{"message.role": msg.role, "message.content": msg.content} for msg in chat_history],
)I get a type error on the attribute value part.
Thanks! In current setup, I get this for
span.set_attribute(
SpanAttributes.LLM_INPUT_MESSAGES,
[
{
"message.role": msg.role,
"message.content": msg.content,
}
],
)
Argument of type "list[dict[str, str]]" cannot be assigned to parameter "value" of type "AttributeValue" in function "set_attribute"
Argument 2 to "set_attribute" of "Span" has incompatible type "list[dict[str, str]]"; expected "str | bool | int | float | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float]"It works but, in the UI, it is just rendered as a JSON
Is it expected behavior?
Thank you!
馃挕聽Hint: Mention RunLLM in the thread for followups.
