Activate actions with function calls or specific phrases
action_trigger
field to specify how the action is triggered. The default trigger is function calling. The examples below demonstrate how to set action triggers for an EndConversation
action config:
Function calls:
action_trigger
field empty and vocode will default to function calls.
Phrase triggers:
PhraseTrigger
instances.
The phrase_condition_type_contains
condition configures the agent to run the action if its output contains the phrase. So, the action will also be run if the agent
says ‘I am ending conversation now’.
TurnOnLight
that turns on your bedroom light when activated. Take the following conversation:
TurnOnLight
with “I will turn on the lights now” as its phrase trigger