-
Notifications
You must be signed in to change notification settings - Fork 89
Description
My JS frontend sends a text message using sendText()
with the topic lk.chat
and some attributes.
The Python agent can access this text message using def on_conversation_item_added(ev: ConversationItemAddedEvent)
but this does not give access to the attributes passed from the frontend.
I think think the ChatMessage
class or the ConversationItemAddedEvent
should be carrying it but I checked but neither of them are.
This is causing significant issues when trying to pass data associated with a text message.
I’ve also tried assigning a handler for the lk.chat
on the ctx.room.register_text_stream_handler('lk.chat', handle_text_stream)
. But I get the error : text stream handler for topic 'lk.chat' already set
which is expected.
I also can't use a random topic to send the message cause I want all the default behaviour of the AI agent that comes with lk.chat
to work as it normally does.
The options property will need to be added to the ChatMessage or the ConversationItemAddedEvent
definition i think.