Ask your NPC to perform actions using our JavaScript SDK
To set up the Actions you need to follow the following steps:
Sign in to Convai's website and navigate to your Character Details.
Navigate to Actions, enable the Action Generation and select the actions you want your NPC to perform.
Go back to your code and Initialize an actionText state that will store the action that you want NPC to perform.
Inside the same useEffect where we check the audio response. Refer to the Getting Started page to quickly understand how and where we check audio response.
Actions have been set up and now you can use the ActionText to perform the required action.