How do I add a "name" field to an existing ChatMes...
# ask-ai
c
How do I add a "name" field to an existing ChatMessage object in LiveKit Python SDK? I'm trying to set message.name = "AgentName" on ChatMessage objects from chat_ctx.items, but I get the error: "ChatMessage" object has no field "name". What's the correct way to: 1. Add a name field to an existing ChatMessage? 2. Or create a new ChatMessage with a name field to replace an existing one? 3. Or modify the ChatContext to include agent names in assistant messages? I need to add agent attribution to assistant messages for proper tracking across agent handoffs.
t
Thanks for reaching out, Clovis. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!