A few days ago, I used RASA open source. But when I started using Form to retrieve certain fields in the user’s intent, it was unable to retrieve the data or trigger the intent. The following is the yaml configuration file:
All ymls are version 3.1
nlu.yml:
- intent: info_input_name
examples: |
- Help me check [nlu](user_input_name)
-
Please help me check [nlu](user_input_name)
domain.yml:
forms:
name_form:
required_slots:
- user_input_name
responses:
utter_output_name:
- text: "OK,I know you‘re {user_input_name} now"
entities:
- user_input_name
slots:
user_input_name:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: user_input_name
rules.yml:
rules:
- rule: avtivate user_input_name form
steps:
- intent: info_input_name
- action: name_form
- active_loop: name_form
- rule: stop user_input_name form
condition:
- active_loop: name_form
steps:
- action: name_form
- active_loop: null
- slot_was_set:
- requested_slot: null
- action: action_getSexByName
- action: utter_output_name
action:
class ActionGetSexByName(Action):
def name(self):
return 'action_getSexByName'
def run(self, dispatcher, tracker, domain):
content = tracker.latest_message
# .intent.entities.value
# content[0]
vall = tracker.get_slot("user_input_name")
print("content:")
print(content)
print("slot:")
print(vall)
return []
Please help me!!!