cuddly-napkin-87317
08/13/2025, 4:20 AMtall-airline-16756
08/13/2025, 4:20 AMtall-airline-16756
08/13/2025, 4:21 AMsession.say
message to the chat history in LiveKit, you can simply use the add_to_chat_ctx
parameter in the session.say()
method. Here’s a quick example:
await session.say(
"Hello. How can I help you today?",
add_to_chat_ctx=True,
)
By setting add_to_chat_ctx
to True
, the message you speak gets added to the chat history, so it becomes part of the conversation record. If you set it to False
, the message won’t show up in the chat history.
Usually, it’s a good idea to keep add_to_chat_ctx
turned on unless you have a specific reason not to. This way, the conversation stays smooth and users can easily look back at what was said.