Skip to main content

data_map.expressions

NameTypeDescription
expressionsobject[]An array of objects that define patterns and corresponding actions.
expressions.stringstringThe actual input or value from the user or system.
expressions.patternstringA regular expression pattern to validate or match the string.
expressions.outputobjectDefines the response or action to be taken when the pattern matches.
expressions.output.responsestringA static response text or message.
expressions.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_meta_dataobjectA JSON object containing any metadata, as a key-value map.
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