(rasa-env) D:\rasa>rasa train --debug 2> train2.log
YamlValidationException: Failed to validate 'data\rules.yml'. Please make sure the file is correct and all mandatory parameters are specified. Here are the errors found during validation:
in data\rules.yml:3:
Key 'triggers' was not defined. Path: '/rules/0'
in data\rules.yml:3:
Key 'actions' was not defined. Path: '/rules/0'
其中 data/rules.yml:
version: "3.1"
rules:
- rule: "stock query rule"
triggers:
- intent: query_stocks
actions:
- action: action_query_stocks
domain.yml
version: "3.1"
intents:
- query_stocks
- greet
- goodbye
- affirm
- deny
- mood_great
- mood_unhappy
- bot_challenge
responses:
utter_greet:
- text: "Hey! How are you?"
utter_cheer_up:
- text: "Here is something to cheer you up:"
image: "https://i.imgur.com/nGF1K8f.jpg"
utter_did_that_help:
- text: "Did that help you?"
utter_happy:
- text: "Great, carry on!"
utter_goodbye:
- text: "Bye"
utter_iamabot:
- text: "I am a bot, powered by Rasa."
utter_ask_price:
- text: "您想查询价格低于多少的股票?"
utter_ask_stk_type:
- text: "您想查询哪个板块的股票?"
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
actions:
- action_query_stocks
entities:
- number
- stk_type
slots:
stk_type:
type: text
mappings:
- type: from_entity
entity: stk_type
intent: query_stocks
rasa3.6 版本 , python3.8
