diff --git a/ai_interviewer_agent.py b/ai_interviewer_agent.py index f4470e8..3d3b0a5 100644 --- a/ai_interviewer_agent.py +++ b/ai_interviewer_agent.py @@ -16,7 +16,7 @@ if os.name == "nt": # Windows # Устанавливаем переменную окружения для Python os.environ.setdefault("PYTHONIOENCODING", "utf-8") -from livekit.agents import Agent, AgentSession, JobContext, WorkerOptions, cli +from livekit.agents import Agent, AgentSession, JobContext, WorkerOptions, cli, RoomInputOptions from livekit.api import DeleteRoomRequest, LiveKitAPI from livekit.plugins import openai, silero @@ -765,7 +765,10 @@ async def entrypoint(ctx: JobContext): # Проверяем ключевые фразы для завершения интервью asyncio.create_task(check_interview_completion_by_keywords(text)) - await session.start(agent=agent, room=ctx.room) + input_options = RoomInputOptions( + close_on_disconnect=False, + ) + await session.start(agent=agent, room=ctx.room, room_input_options=input_options) logger.info("[INIT] AI Interviewer started")