How to extract username & password entities from text?

akela
(Ali Hejazi) #1

Hi everyone!

I’m building a chatbot to take the username and password from a user and use them to login to a platform.

How to I train Rasa NLU to pick up a username? Theoretically speaking, there are infinitely many usernames and passwords. So I don’t know how to train NLU as there is no specified format.

Chatbot example:

Chatbot: May I please have your username? User could respond with “username”, or “My username is …”, or “It is …”, or “it’s …” etc.

Chatbot: Thanks, may I please have your password too? User could respond with “password”, or “My password is …”, or “It is …”, or “it’s …” etc.

Can someone please help me with how to train NLU to pick up these credentials?

Also please tell me how to save them to slots, so I can call a custom action to log the user in.

If I’m doing anything wrong, please let me know!

Thanks!

(Tyler Burton) #2

Hi @alihejazi, check out this reply to my similar request. You should use a form action and then extract those unique fields from the user’s last response.

2 Likes
(Ali Hejazi) #3

@jabberlope Thank you very much for the help. Took quite a while for me to understand because there’s lots of reading, but it works now.

(Tyler Burton) #4

Glad I could help @alihejazi!