Is there any way to set Slot by API not by action

I have some trouble reproducing the error. I have a simple bot, that has a slot called name and an action called action_greet. I get the value of slot name and utter Hello {name}! or just Hello! depending on whether the slot is set or not in that action.

I’m executing the following steps:

  1. Start the action server
python -m rasa_core_sdk.endpoint --actions actions
  1. Start the rasa server
python -m rasa_core.run --endpoint endpoints.yml --enable_api -d models/current/dialogue -u models/current/nlu -o out.log
  1. Set the slot via the API
curl -X POST \
  'http://localhost:5005/conversations/default/tracker/events?include_events=NONE' \
  -H 'Content-Type: application/json' \
  -d '{"event":"slot","name":"name","value":"Tanja","timestamp":0}'
  1. Trigger the action
curl -X POST \
  'http://localhost:5005/conversations/default/execute?include_events=AFTER_RESTART' \
  -H 'Content-Type: application/json' \
  -d '{"name":"action_greet"}'

The last request successfully returns the message Hello Tanja!. So the slot I set before, was used in the action action_greet.

What steps are you executing?

1 Like