Add new endpoint

How and where add this change

Blockquote * #4964: External events and reminders now trigger intents (and entities) instead of actions.Add new endpoint /conversations/<conversation_id>/trigger_intent , which lets the user specify an intent and a list of entities that is injected into the conversation in place of a user message. The bot then predicts and executes a response action. Blockquote

because i use interactive learning and rasa print this warning

"FutureWarning: Triggering actions via the execute endpoint is deprecated. Trigger an intent via the /conversations/<conversation_id>/trigger_intent endpoint instead. result = await result "

Hi @nicolas

The warning appears because triggering actions at random turns (i.e. actions not caused by user) in the conversation will mess up your stories if you save them for training, as such random actions cannot be predicted. You can get around this with an ActionReverted event, but we now recommend a new way of handling external events:

  • Instead of the trigger_action endpoint, send your external messages to the trigger_intent endpoint
  • Use the mapping policy to map the triggered intent to the action you wish to execute

We are currently working on a tutorial for this, but it is not merged yet. You can have a look here: Implement reminderbot demo and add user guide by JEM-Mosig · Pull Request #5189 · RasaHQ/rasa · GitHub

Also, check out the other part of the docs, here: Responses

Hello @j.mosig, I’m getting this warning even when the bot is responding through a custom action to a user utterance. I introduced a custom action that has a basic delay (just to test this) before going to subsequent actions. This delay is the first action for all user utterances.

Here’s the warning again -

? The bot wants to run 'r_basic_delay', correct?  Yes
/build/lib/python3.6/site-packages/rasa/server.py:178: FutureWarning: Triggering actions via the execute endpoint is deprecated. Trigger an intent via the `/conversations/<conversation_id>/trigger_intent` endpoint instead.
  result = await result

Maybe I should wait till the change is merged and a documentation is provided. :slight_smile: