This commit is contained in:
1 parent
63e15b6023
commit
b1643b635d
2 files changed
+38
-1
No files matched your search
@@ -758,6 +758,17 @@ async def handle_job(ctx: JobContext) -> None:
|
||||
)
|
||||
|
||||
await ctx.connect()
|
||||
# The participant can appear in the browser slightly before AgentSession is
|
||||
# ready to accept lk.chat streams. Explicitly signal readiness so the first
|
||||
# typed message is never raced against session startup.
|
||||
try:
|
||||
await ctx.room.local_participant.publish_data(
|
||||
json.dumps({"type": "agent_ready"}),
|
||||
reliable=True,
|
||||
topic="conversation-control",
|
||||
)
|
||||
except Exception as exc: # noqa: BLE001
|
||||
logger.warning("failed to publish agent readiness: %s", exc)
|
||||
logger.info("Agent connected to room %s", ctx.room.name)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user