fix: update AgentSession.start() for livekit-agents 1.x API
livekit-agents 1.x removed the 'participant' parameter from AgentSession.start(). Use room_input_options with participant_identity instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
19efeec26d
commit
f1d50e43f1
|
|
@ -13,7 +13,7 @@ import json
|
|||
import logging
|
||||
|
||||
from livekit import agents, rtc
|
||||
from livekit.agents import AgentSession, Agent, RoomInputOptions, JobContext, JobProcess, cli, WorkerOptions
|
||||
from livekit.agents import AgentSession, Agent, RoomInputOptions, JobContext, JobProcess, cli, WorkerOptions, room_io
|
||||
from livekit.plugins import silero
|
||||
|
||||
from .config import settings
|
||||
|
|
@ -170,9 +170,11 @@ async def entrypoint(ctx: JobContext) -> None:
|
|||
)
|
||||
|
||||
await session.start(
|
||||
room=ctx.room,
|
||||
agent=IT0VoiceAgent(),
|
||||
participant=participant,
|
||||
room=ctx.room,
|
||||
room_input_options=room_io.RoomInputOptions(
|
||||
participant_identity=participant.identity,
|
||||
),
|
||||
)
|
||||
|
||||
logger.info("Voice session started for participant %s", participant.identity)
|
||||
|
|
|
|||
Loading…
Reference in New Issue