Skip to main content

Hold a function call until the user's turn is confirmed

By Steven Van ·

A new defer_until_eot flag stops irreversible function calls, like ending a call, from firing before a user's turn is confirmed.

Deepgram's Voice Agent API can now hold a function call until a user's turn is confirmed, instead of dispatching it the moment the LLM emits it. Agent audio has always waited for speech-to-text to confirm the user has stopped talking; function calls did not, so an irreversible action like ending a call or booking an appointment could fire during a turn the user then continued.

  • Adding defer_until_eot: true to a function in agent.think.functions holds that call until the turn is confirmed. If the user keeps speaking and the turn resumes, the call is discarded before it runs. The default is false, so existing agents are unchanged, and deferring one function does not delay others in the same turn. It works with every listen provider, not just Flux.
  • Clients now receive a FunctionCallCancelled event when a client-side function call they already received is cancelled, whether the user resumed speaking inside the speculative window or barged in after the turn was confirmed. Clients should stop work on that call's id and send no FunctionCallResponse for it.

Full details are in Deepgram's turn confirmation documentation.

Deepgram
Deepgram
Power enterprise voice solutions with Deepgram’s Speech-to-Text, Text-to-Speech, and Voice Agent APIs. Real-time, accurate, and built for scale.
View Deepgram →
Sources

Original source

Read Hold a function call until the user's turn is confirmed on Creators Toolbox