Skip to main content

data_map.output

The data_map.output object is used to define the output or response of the AI agent. The response is the static text or message that will be fed to the AI agent's context, this can be used to provide a response to the user or to provide additional information/instructions to the AI agent. The action object is used to define the actions that will be performed upon a successful SWAIG function trigger.

Parameters

NameTypeDescription
outputobjectThe output object.
output.responsestringA static response text or message returned to the AI agents context.
output.actionobject[]A list of actions to be performed upon matching.

Valid actions for output.action

NameTypeDescription
SWMLobjectA SWML object to be executed.
saystringA message to be spoken by the AI agent.
stopbooleanWhether to stop the conversation.
toggle_functionsobject[]Whether to toggle the functions on or off.
toggle_functions.activebooleanWhether to activate or deactivate the functions. Default is true
toggle_functions.functionobject[]A list of functions to toggle.
back_to_back_functionsbooleanWhether to execute functions back to back. Default is false
set_global_dataobjectA JSON object containing any global data, as a key-value map. This action sets the data in the global_meta_data to be globally referenced.
set_meta_dataobjectA JSON object containing any metadata, as a key-value map. This action sets the data in the meta_data to be referenced locally in the function.
unset_global_datastring | objectThe key of the global data to unset from the global_meta_data. You can also reset the global_meta_data by passing in a new object.
unset_meta_datastring | objectThe key of the metadata to unset from the meta_data. You can also reset the meta_data by passing in a new object.
playback_bgobjectA JSON object containing the audio file to play.
playback_bg.filestringURL or filepath of the audio file to play.
playback_bg.waitbooleanWhether to wait for the audio file to finish playing before continuing. Default is false
stop_playback_bgbooleanWhether to stop the background audio file.
user_inputstringused to inject text into the users queue as if they input the data themselves.
context_switchobjectA JSON object containing the context to switch to. Default is not set.
context_switch.system_promptstringThe instructions to send to the agent. Default is not set.
context_switch.consolidatebooleanWhether to consolidate the context. Default is false
context_switch.user_promptstringA string serving as simulated user input for the AI Agent. During a context_switch in the AI's prompt, the user_prompt offers the AI pre-established context or guidance. Default is not set