Hi, currently, I am sending a message to rasa like “login:username password” where username is my username and password is my password using API : http://localhost:5005/webhooks/rest/webhook and then using this API: getConversationTracker to get back the tracker for the message “login:username password” so that I can do further processing on the basis of intents that it was classified into and call any specific custom action. Is this the best way to do so or is there any better way?
That’s an unusual intent. Are you sure you want to be sending passwords this way?
If so, have you created an intent that should catch this along with a rule/story to handle the response?
Yes, here’s how the story looks.
- story: test
steps:
- intent: greet
- action: utter_greet
- intent: login_credentials
- action: action_extract_credentials
Right now I am just building a basic working application. We will later find a better way to process passwords. But there are more usecases. The user may ask “what’s is my loan amount?”. In this case too, we will send this to Rasa then call tracker API to get the intent and then find the loan amount. But is there any better way other than first using http://localhost:5005/webhooks/rest/webhook and then getConversationTracker?
I would always use rules if possible instead of stories and would split that story into two rules.
I would also pass the login info via metadata and process in action_session_start
instead of using your login_credentials
intent and associated action. You can read about action_session_start
and session_started_metadata
on the default actions page.
Can you please give an example of how you will split the stories into rules?
For your example, you only need one rule:
- story: greet
steps:
- intent: greet
- action: utter_greet
The credential information would not have an intent, you would pass that as metadata on the REST or socket channel and process it in action_session_start
.