Hello i am trying to create a form in order to save user’s input. But i have a problem : when the form starts and asks for the user’s first input, an error message occurs:
rasa.core.actions.action - Failed to extract slot {name} with action {form name}
What i want the bot to execute is very simple: ask for user name and few others questions.
Here is my actions.py file:
class AddUserForm(FormAction):
def name(self) -> Text:
"""Unique identifier of the form"""
return "add_user_form"
@staticmethod
def required_slots(tracker: Tracker) -> List[Text]:
"""A list of required slots that the form has to fill"""
return ["Name", "Description", "Groups_List", "Email_address"]
def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
"""A dictionary to map required slots to
- an extracted entity
- intent: value pairs
- a whole message
or a list of them, where a first match will be picked"""
return {
"Name": self.from_entity(entity="Name", intent="inform_name"),
"Description": [
self.from_entity(
entity="Description", intent=["inform"]
)
],
"Groups_List": [
self.from_entity(entity="Groups_List"),
],
"Email_address": [
self.from_intent(intent="inform"),
]
}
def submit(
self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> List[Dict]:
"""Define what the form has to do
after all required slots are filled"""
# utter submit template
dispatcher.utter_template("utter_submit", tracker)
return []
Here is my domain file:
intents:
- greet
- ADD_USER
- affirm
- deny
- thank_you
- inform_name
entities:
- Name
- Description
- Groups_List
- Email_address
slots:
Name:
type: unfeaturized
auto_fill: false
Description:
type: unfeaturized
auto_fill: false
Groups_List:
type: unfeaturized
auto_fill: false
Email_address:
type: unfeaturized
auto_fill: false
requested_slot:
type: unfeaturized
templates:
utter_greet:
- text: 'Hello Frederic! How can I help you?'
utter_confirm_add_user:
- text: ' If i understand correctly, you want to add anew user to the Planisware application ?'
utter_launching_request:
- text: 'Your request has been sent for validation. '
utter_bye:
- text: 'Thank you for using our chatbot, have a nice day Frederic'
utter_default:
- text: "Sorry, I didn't get that, can you rephrase it?"
utter_slots_values:
- text: "I am going to add a user with the following parameters:\n
- Name: {Name}\n
- Description: {Description}\n
- Groups_List: {Groups_List}\n
- Email_address: {Email_address}"
utter_ask_Name:
- text: "Can you please give me his name ?"
utter_ask_Description:
- text: "Can you please give me his Description ?"
utter_ask_Groups_List:
- text: "Can you please give me his group list ?"
utter_ask_Email_address:
- text: "Can you please give me his email address ?"
actions:
- utter_greet
- utter_confirm_add_user
- utter_launching_request
- utter_bye
- utter_default
- utter_slots_values
forms:
- add_user_form
And this is my Data: ## intent:greet
- hey
- hello
- hi
- good morning
- good evening
- hey there
## intent:ADD_USER
- Add User
- Add account
- New User
- New account
- New
- Add
- Add a new user to x
- Add a new account to x
- Add a new user to x
- Add a new account to x
- I would like to add somebody to the x application
- I would like to add somebody to the x application
[//] ## intent:inform_name ## intent:inform_descritpion ## intent:inform_group_list ## intent:inform_email
## inform
His name is [Elie](Name)
The name is [Elie](Name)
The user name is [Elie](Name)
His Description is is [A4675](Description)
The Description is [A4675](Description)
The user Description is [A4675](Description)
His email adress is [Elie](Groups_List)
The email adress is [Elie](Groups_List)
The user email is [Elie](Groups_List)
His email adress is is [elie@gmail.com](Email_address)
The email adress is [elie@gmail.com](Email_address)
The user email adress is [elie@gmail.com](Email_address)
## inform_name
His name is Elie
The name is Elie
The user name is Elie
Elie
## intent:affirm
- yes
- indeed
- of course
- that sounds good
- correct
- sure
- sure thing
## intent:deny
- no
- never
- I don't think so
- don't like that
- no way
- not really
## thank_you
- um thank you good bye
- okay cool uh good bye thank you
- okay thank you good bye
- you rock
- and thats all thank you and good bye
- thank you and good bye
- sorry about my mistakes thank you good bye
- noise thank you good bye
- thank you goodbye noise
- okay thank you goodbye
- uh thank you good bye
- thank you goodbye
- thank you goodbye noise thank you goodbye
- breath thank you goodbye
- thank you
- okay thank you
- thanks goodbye
- ah thank you goodbye
- thank you noise
- thank you good bye
- breath thank you very much goodbye
- thanks
- noise thank you goodbye
- unintelligible thank you goodbye
- uh okay thank you good bye
- thank you bye
- um okay thank you good bye
And i will join the error: