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.

NameTypeDefaultDescription
outputRequiredobject-An object that accepts the output Parameters.

output Parameters

NameTypeDefaultDescription
responseRequiredstring-A static response text or message returned to the AI agents context.
actionOptionalobject[]-A list of actions to be performed upon matching.

Valid actions for output.action

NameTypeDefaultDescription
SWMLobject-A SWML object to be executed.
saystring-A message to be spoken by the AI agent.
stopboolean-Whether to stop the conversation.
toggle_functionsobject[]-Whether to toggle the functions on or off.
toggle_functions.activebooleantrueWhether to activate or deactivate the functions.
toggle_functions.functionobject[]-A list of functions to toggle.
set_global_dataobject-A 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_dataobject-A 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 | object-The 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 | object-The key of the metadata to unset from the meta_data. You can also reset the meta_data by passing in a new object.
playback_bgobject-A JSON object containing the audio file to play.
playback_bg.filestring-URL or filepath of the audio file to play. Authentication can also be set in the url in the format of username:password@url.
playback_bg.waitbooleanfalseWhether to wait for the audio file to finish playing before continuing.
stop_playback_bgboolean-Whether to stop the background audio file.
user_inputstring-Used to inject text into the users queue as if they input the data themselves.
context_switchobject-A JSON object containing the context to switch to.
context_switch.system_promptstring-The instructions to send to the agent.
context_switch.consolidatebooleanfalseWhether to consolidate the context.
context_switch.user_promptstring-A 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.