caller_turns
caller_turns
Read what the caller said from a SWAIG request’s conversation, so a tool can check that an argument is something the caller said and not something the model inferred.
A request carries the conversation only with the swaig_post_conversation AI
parameter on. Define the tool with needs_conversation=True on
define_tool(), which turns it on.
Parameters
raw_data
The SWAIG request (the handler’s raw_data), or a call_log list.
since
Only the turns from this time on: a call log entry’s timestamp, in microseconds
since the epoch.
last
Only the newest this many turns. Keyword-only.
Returns
list[str] — The caller’s turns, oldest first, as the recognizer’s final text,
after hearing hints and number formatting. Empty when the request carries no
conversation. For the words as the recognizer heard them, with a confidence for each,
see speech_finals().
Example
Part of the post-prompt normalization module.