表单是't在rasa 2.0.2上激活



好的,所以我运行的是Rasa 2.0.2,每当我试图激活我的表单时,Rasa似乎无法加载它们。我确信我的代码运行正常,因为它运行在rasa2.7.0上。还要注意的是,通过我在网上读到的一些帖子,我知道旧版本的rasa需要带有特定名称的发音,比如:";outter_ask_name"所以我这样做了,插槽也需要这样命名:";slot_date";。所以我使用了这两种方法,但仍然没有成功。有什么帮助吗?

domain.yml:

CCD_ 1版本:";2.0〃;

intents:
- greet
- inform
- subscribe
- bot_challenge
- name
- age
- learn
- book demo
- describe
- describe more
- learn more
- learn less
- date
- time
- firstname
- lastname
- email
- country
- kai101

slots:
email1:
type: unfeaturized
influence_conversation: false
slot_date:
type: unfeaturized
influence_conversation: false
slot_time:
type: unfeaturized
influence_conversation: false
slot_firstname:
type: unfeaturized
influence_conversation: false
slot_lastname:
type: unfeaturized
influence_conversation: false
slot_email:
type: unfeaturized
influence_conversation: false
slot_country:
type: unfeaturized
influence_conversation: false

responses:
utter_greet:
- text: |
Hello & welcome to achatbotAgancy.com! Your one-stop shop to the world of chatbots.
How may I assist you?
buttons:
- title: "Learn about chatbots"
payload: '/learn'
- title: "What do you want your chatbot to do? In a few words describe the purpose of your chatbot:"
payload: '/describe'
- title: "Book a demo to test drive us"
payload: '/book demo'
utter_kuh:
- text: |
What is your email address?
utter_subscribed:
- text: |
Check your inbox at {email} in order to finish subscribing to the newsletter!
- text: You're all set! Check your inbox at {email} to confirm your subscription.
- text: You've been subscribed, the newsletter will be sent to {email} shotly.
utter_i_am_a_bot:
- text: |
I am a bot powered by RASA
utter_my_name:
- text: |
I am KAI The Chatbot
utter_my_age:
- text: |
I was made on June 2 2021 and I'm still being developed on a regular basis.
utter_learn:
- text: |
A chatbot is a software application used to conduct an on-line chat conversation via text or text-to-speech, in lieu of providing direct contact with a live human agent.
Did that answer help your question or do need more information?
buttons:
- title: "No thank you"
payload: '/learn less'
- title: "I am intrested in learning more"
payload: '/learn more'
utter_description:
- text: |
What do you want your chatbot to do? In a few words describe the purpose of your chatbot:
utter_description_reply:
- text: |
Ah yes, we can definitely help with that. May I book an appointment for you with one of my colleagues?
utter_book_demo:
- text: |
Sure. I will ask one of our humans to reach out. May I know:
utter_learn_more:
- text: |
A chatbot is a software application used to conduct an on-line chat conversation via text or text-to-speech, in lieu of providing direct contact with a live human agent.
Did that answer help your question or do need more information?
buttons:
- title: "No thank you"
payload: '/learn less'
- title: "I am intrested in learning more"
payload: '/learn more'
utter_learn_less:
- text: |
Ok great.Well, I am one message away. Don’t be shy.

utter_learn_more1:
- text: |
Sure, I am more than happy to book an appointment for you.
utter_ask_date:
- text: |
May I know the best date that works for you?
utter_ask_time:
- text: |
Great, and what time??
utter_ask_firstname:
- text: |
May I know your first name?
utter_ask_lastname:
- text: |
May I know your last name?
utter_ask_email:
- text: |
May I know your email address?

utter_ask_country:
- text: |   
Which country are you in?

utter_done_requesting:
- text: |   
Awesome Mr.{slot_firstname} {slot_lastname}, one of my colleagues will contact you shortly on your email {slot_email} to book an appointment on {slot_date} at {slot_time}
actions:
- '...'
- utter_greet
- utter_kuh
- utter_subscribed
- utter_i_am_a_bot
- utter_my_name
- utter_my_age
- utter_learn
- utter_description
- utter_description_reply
- utter_book_demo
- utter_learn_more
- utter_learn_less
- utter_learn_more1
- utter_ask_date
- utter_ask_time
- utter_ask_firstname
- utter_ask_lastname
- utter_ask_email
- utter_ask_country
- utter_done_requesting

forms:
informative_form:
required_slots:
slot_date:
- type: from_text
slot_time:
- type: from_text
slot_firstname:
- type: from_text
slot_lastname:
- type: from_text
slot_email:
- type: from_text
slot_country:
- type: from_text

session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true

forms.yml:

forms:
informative_form:
required_slots:
slot_date:
- type: from_text
slot_time:
- type: from_text
slot_firstname:
- type: from_text
slot_lastname:
- type: from_text
slot_email:
- type: from_text
slot_country:
- type: from_text

nlu.yml:

version: "2.0"
nlu:
- intent: greet
examples: |
- Hi
- Hey!
- Hallo
- Good day
- Good morning
- howdy
- intent: subscribe
examples: |
- I want to get the newsletter
- Can you send me the newsletter?
- Can you sign me up for the newsletter?
- Can I  on your mailing list?
- intent: inform
examples: |
- My email is example@example.com
- random@example.com
- Please send it to anything@example.com
- Email is something@example.com
- intent: bot_challenge
examples: |
- Are you a bot?
- Am I talking to a human?
- is this a chatbot?
- is this a real person?
- you're a bot, aren't you
- intent: name
examples: |
- What's your name?
- What did they name you??
- what are you called?
- What should I call you ?

- intent: learn
examples: |
- Learn about chatbots
- intent: describe
examples: |
- What do you want your chatbot to do? In a few words describe the purpose of your chatbot:
- intent: describe more
examples: |
- I want my chatbot to
- I want it to do something
- I want it to be something
- I want it 
- To do something
- want it to be something
- do something
- intent: book demo
examples: |
- Book a demo to test drive us
- intent: learn less
examples: |
- No, thank you.
- intent: learn 
examples: |
- I am interested in learning more.
- intent: kai101
examples: |
- Ask me your questions.
- Ask me about the form.
- intent: date
examples: |
- May 31 1999
- 31/05/1999
- July 16 1978
- 16/07/1978
- January 4 1974
- 04/01/1974
- September 10 2003
- 10/09/2003
- intent: time
examples: |
- 3:00 PM
- 8:00 AM
- 16:00
- 8 in the morning
- 4 afternoon
- 12 in the morning
- 4 in the evening
- intent: firstname
examples: |
- Kareem
- Yehya
- Mariam
- Johnny
- Charbel
- Nour
- Hanin
- Hussein
- John
- intent: lastname
examples: |
- Aridi
- Abou Dargham
- Harfouch
- Abou Dagher
- Smith
- Malaeb
- intent: email
examples: |
- My email is example@example.com
- random@example.com
- Please send it to anything@example.com
- Email is something@example.com
- intent: country
examples: |
- Lebanon
- USA
- UAE
- Palestine
- Syria
- Iraq
- Kuwait
- United States
- United Arab Emirates
- Kuwait
- Bahrain
- Saudi Arabia
- germany

我有一些观察结果可以开始找到正确的答案:

  • 你能提供更多你面临的问题背后的背景吗?你在尝试什么命令,stacktrace的错误是什么?如果您可以运行rasa shell --debug并在问题中发布完整的调试日志,那将非常有用
  • 如果在domain.yml中指定表单,则不需要根据文档使用单独的forms.yml文件
  • 如果将influence_conversation属性指定为false,则不需要使用type: unfeaturized,特别是因为它已被弃用。也许这些都应该是type: text
  • 你是如何使用stories0中的表格的?你也能分享这些文件的内容吗?formbot示例是一个很好的指南

最新更新