cool-camera-83057
05/08/2025, 8:34 AMtall-airline-16756
05/08/2025, 8:34 AMtall-airline-16756
05/08/2025, 8:34 AMAgentSession
to call a language model (LLM), you can set up notifications for various events using event handlers with the @self._session.on()
decorator. Key notifications include:
• Speech-related events: Notifications for when speech starts, stops, or is transcribed.
• Function call events: Notifications for when function calls are collected or finished.
• Response events: Notifications for when response content is complete.
• Metrics events: Notifications for when metrics are collected.
These events allow you to monitor and handle different stages of the interaction with the LLM effectively.
Sources: livekit.agents.multimodal.multimodal_agent API documentation | livekit.agents.multimodal.multimodal_agent API documentationcool-camera-83057
05/08/2025, 8:35 AMtall-airline-16756
05/08/2025, 8:36 AMEventTypes
in AgentSession
are defined as follows:
• user_state_changed
• agent_state_changed
• user_input_transcribed
• conversation_item_added
• function_tools_executed
• metrics_collected
• speech_created
• error
• close
These events are used to handle various stages and actions within the session effectively.
Sources: Tree View: | dse-workbench