All - Activity - gcgloven - Rasa Community Forum
Error when running action server and in weather bot
class ActionWeather(Action):
def name(self):
return "action_weather"
def run(self, dispatcher, tracker, domain):
api_key = 'INSERT YOUR OWN KEY' # your apixu key
loc = tracker.get_slot('location') # obtain slot
api_address = 'http://api.apixu.com/v1/current.json?key={}&q={{}}'.format(api_key, loc)
Does EventBroker trace requests sent to Rasa NLU?
Event broker captures rasa core’s processed data for there’s a reply. You may use this instead:
curl --request POST \
--url http://localhost:5005/webhooks/rest/webhook \
--header 'content-type: application/json' \
--data '{
"message": "Hello"
}'
Is there a way to develop Yes/NO decision flow based chatbot in RASA?
Use FormAction
If you need reference, go to Rasa’s Git repository and check out their restaurant examples.
Bot die when cannot understand user
To ensure the bot logic flows in its planned path, you will need to declare some possible pausing of form, ending of forms or even ignoring forms in the middle of a conversation. Don’t make a single story too long. You need to have more cases in your stories; that’s what I would guess.
About utter_default
This depends on your design for your stories. Ideally for every intent that gives an utter reply, you will need to write 2 liner stories for these cases:
Story 1
- intent_name1
- utter_response1
Story 2
- intent_name2
- utter_response2
Then for complicated logic flows, you will need to visit your fallback policy’s settings and check your threshold:
- name: "FallbackPolicy"
nlu_threshold: 0.5
core_threshold: 0.5
fallback_action_name: "action_default_fallback"
Custom actions
For specific products, you can put it under one intent:
Intent: provide specific url
Go to set your entities and slot in the domain file:
slots:
api_name:
type: text
How to create our custom questions?
Hi, you may find the introduction to Rasa at this page. It covers how to write a story and the training dialogues. To train the bot, you need to update your domain.yml, nlu.md, and stories.md files.
How to fix "Encountered an exception while running custom action"
Check 3 things:
pip install rasa-sdkpip install rasa# sometimes you may mix up the dependencies- To run actions, you could key in:
rasa run actions -vv
This is debug mode; then you can post your Rasa-core log file for us to review.
How can let my bot save all conversations and how to initialize the conversations?
You may use tracker store to store all the data into MongoDB, SQLite, or MySQL. Later you can write your program for querying all chat history.
For other storage methods, you may check out tracker stores in Rasa.