fix(realtime): complete workflow message transitions
This commit is contained in:
@@ -909,7 +909,22 @@ async def run_realtime_pipeline(
|
||||
|
||||
call_end = CallEndCoordinator(queue_call_end)
|
||||
client_tools = ClientToolBroker()
|
||||
client_tools.set_interrupt_handler(realtime.interrupt)
|
||||
|
||||
async def interrupt_for_client_tool_result() -> None:
|
||||
"""Release confirmations after the realtime response is interrupted.
|
||||
|
||||
Fixed Message speech intentionally suppresses the provider transcript,
|
||||
so the text aggregator may have no assistant turn from which to emit an
|
||||
``on_interruption_processed`` event. The realtime adapter owns and
|
||||
clears that response state itself. Wait for the provider boundary as
|
||||
well, matching Pipeline's rule that the next node cannot generate until
|
||||
the interrupted response has fully finished.
|
||||
"""
|
||||
await realtime.interrupt()
|
||||
await realtime.wait_for_response_boundary()
|
||||
client_tools.on_interruption_processed()
|
||||
|
||||
client_tools.set_interrupt_handler(interrupt_for_client_tool_result)
|
||||
user_input = RealtimeUserInputProcessor(
|
||||
should_ignore_input=lambda: (
|
||||
call_end.ending or not input_state["enabled"]
|
||||
|
||||
Reference in New Issue
Block a user