Add on_client_ready method to BaseBrain and WorkflowBrain
- Implement on_client_ready in BaseBrain to handle client-visible state after the app message channel is ready. - Extend WorkflowBrain with on_client_ready to replay state that may have been emitted before WebRTC data was ready. - Update pipeline to call on_client_ready when a client connects. - Enhance tests to verify the correct behavior of on_client_ready in WorkflowBrain.
This commit is contained in:
@@ -1218,6 +1218,7 @@ async def run_pipeline(
|
||||
if greeting and not greeting_transcript_sent:
|
||||
greeting_transcript_sent = True
|
||||
await queue_transcript("assistant", greeting, time_now_iso8601())
|
||||
await brain.on_client_ready()
|
||||
|
||||
@transport.event_handler("on_client_connected")
|
||||
async def on_client_connected(_transport, _client):
|
||||
|
||||
Reference in New Issue
Block a user