add close_on_disconnect
This commit is contained in:
parent
2f0a8e3931
commit
e23a340445
@ -16,7 +16,7 @@ if os.name == "nt": # Windows
|
|||||||
# Устанавливаем переменную окружения для Python
|
# Устанавливаем переменную окружения для Python
|
||||||
os.environ.setdefault("PYTHONIOENCODING", "utf-8")
|
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.api import DeleteRoomRequest, LiveKitAPI
|
||||||
from livekit.plugins import openai, silero
|
from livekit.plugins import openai, silero
|
||||||
|
|
||||||
@ -765,7 +765,10 @@ async def entrypoint(ctx: JobContext):
|
|||||||
# Проверяем ключевые фразы для завершения интервью
|
# Проверяем ключевые фразы для завершения интервью
|
||||||
asyncio.create_task(check_interview_completion_by_keywords(text))
|
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")
|
logger.info("[INIT] AI Interviewer started")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user