diff --git a/livekit-agents/livekit/agents/multimodal/multimodal_agent.py b/livekit-agents/livekit/agents/multimodal/multimodal_agent.py index 24a7be66c..35c5bcd30 100644 --- a/livekit-agents/livekit/agents/multimodal/multimodal_agent.py +++ b/livekit-agents/livekit/agents/multimodal/multimodal_agent.py @@ -2,7 +2,7 @@ import asyncio from dataclasses import dataclass -from typing import AsyncIterable, Callable, Literal, Protocol +from typing import Any, AsyncIterable, Callable, Literal, Protocol import aiohttp from livekit import rtc @@ -31,7 +31,7 @@ class _InputTranscriptionProto(Protocol): item_id: str """id of the item""" - transcript: str | None + transcript: str """transcript of the input audio""" @@ -70,6 +70,7 @@ def session( class _RealtimeAPISession(Protocol): async def set_chat_ctx(self, ctx: llm.ChatContext) -> None: ... + def on(self, event_name: str, handler: Callable[..., Any]) -> None: ... def _push_audio(self, frame: rtc.AudioFrame) -> None: ... @property def fnc_ctx(self) -> llm.FunctionContext | None: ...