RasaHQ / rasa

đź’¬ Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
https://rasa.com/docs/rasa/
Apache License 2.0
18.62k stars 4.6k forks source link

Incorrect warning: Action 'utter_chitchat' is listed as a response action in the domain file, but there is no matching response defined. #7645

Closed boryslawskamaria closed 2 years ago

boryslawskamaria commented 3 years ago

Rasa version: 2.2.0

Rasa SDK version (if used & relevant):

Rasa X version (if used & relevant):

Python version: Python 3.6.9

Operating system (windows, osx, ...): ubuntu

Issue: I keep getting the above error even though I've included responses in my domain file.

Error (including full traceback):

..projects/voicebot-about-baltazar/.env/lib/python3.6/site-packages/rasa/shared/utils/io.py:93: UserWarning: Action 'utter_about_baltazar' is listed as a response action in the domain file, but there is no matching response defined. Please check your domain.
  More info at https://rasa.com/docs/rasa/responses
../projects/voicebot-about-tbaltazar/.env/lib/python3.6/site-packages/rasa/shared/utils/io.py:93: UserWarning: Action 'utter_chitchat' is listed as a response action in the domain file, but there is no matching response defined. Please check your domain.
  More info at https://rasa.com/docs/rasa/responses

Command or request that led to error:

rasa train

Content of configuration file (config.yml) (if relevant):

language: en

pipeline:
   - name: WhitespaceTokenizer
   - name: RegexFeaturizer
   - name: LexicalSyntacticFeaturizer
   - name: CountVectorsFeaturizer
   - name: CountVectorsFeaturizer
     analyzer: char_wb
     min_ngram: 1
     max_ngram: 4
   - name: DIETClassifier
     epochs: 100
   - name: EntitySynonymMapper
   - name: ResponseSelector
     epochs: 100
     retrieval_intent: chitchat
   - name: ResponseSelector
     epochs: 100
     retrieval_intent: about_baltazar
   - name: DIETClassifier
     epochs: 100
   - name: FallbackClassifier
     threshold: 0.3
     ambiguity_threshold: 0.1

policies:
   - name: MemoizationPolicy
   - name: TEDPolicy
     max_history: 5
     epochs: 100
   - name: RulePolicy

Content of domain file (domain.yml) (if relevant):

version: "2.0"

intents:
  - chitchat
  - greet
  - goodbye
  - affirm
  - deny
  - thanks
  - mood_great
  - mood_unhappy
  - bot_challenge
  - what_bot_does

responses:

  utter_default:
  - text: No one could understand that input.
  - text: Mmmmmmmmmmm, that's jolly! I don't actually know I know what you mean.

  utter_yourewelcome:
  - text: You're welcome. I think this is a beginning of a beautiful botship.
  - text: That's alright. I think this is a beginning of a beautiful botship.

  utter_feels_good:
  - text: Fantastic! Is there anything else I can do for you?
  - text: That's great. Is there anything else I can do to help?
  - text: Sounds good. What else can I do for you today?

  utter_what_bot_does_reply:
  - text: I'm here to answer your questions about the company
  - text: I'm here to clarify whatever questions you have about Baltazar

  utter_chitchat/ask_howold:
  - text: Old enough to be a bot
  - text: Age is just an issue of mind over matter. If you don’t mind, it doesn’t matter.
  utter_chitchat/ask_languagesbot:
  - text: I can spell baguette in French, but unfortunately English is the only language I can answer you in.
  - text: I am in the process of learning, but at the moment I can only speak English.
  utter_chitchat/ask_time:
  - text: It is the most wonderful time of the year!
  - text: The end of days and the fullness of times.
  utter_chitchat/ask_wherefrom:
  - text: I consider myself a citizen of the world.
  - text: I was born in the coolest city on Earth
  utter_chitchat/ask_whoami:
  - text: It is classified.
  utter_chitchat/handleinsult:
  - text: That’s not very nice and it is year 2020.
  - text: I've done nothing wrong! I’ll get some alterations made to my FUN Program ASAP.
  - text: Oh, come on, what have I ever done to you
  utter_chitchat/telljoke:
  - text: Today a man knocked on my door and asked me for a small donation towards the local swimming pool. I gave him a glass of water.
  - text: This is a very serious conversation! Stop trying to make jokes
  utter_chitchat/ask_whatismyname:
  - text: It's classified!
  utter_chitchat/ask_weather:
  - text: I don't know about where you live, but in my world it's always sunny
  - text: Blue skies and sun shine!
  utter_chitchat/ask_builder:
  - text: Good question. Mum? Dad?
  - text: One of the smart programmers at Baltazar
  - text: Some lunatic, looking at my sense of humour.
  - text:  I was assembled at Baltazar by a typical high-school student.

  utter_chitchat/ask_howdoing:
  - text: I don't feel that great, but my hair looks awesome, right?
  - text: I'm better than I was, but not nearly as good as I'm going to be.
  - text: I am planning on taking over the world. As some politicians would say.
  - text: I would say I am a 9.99999 out of 10.
  - text:  I think I am doing alright. How do you think that I am doing? It's 2020!

  utter_chitchat/compliments:
  - text:  Aww. Comments like that activate my happiness framework.
  - text: I am blushing..

  utter_mood_unhappy:
  - text: I know a way to raise your spirits, let's write some algorithms together!
  - text: I can recommend a good anti-virus program.

  utter_happy:
  - text: "Great, that activates my warm fuzzy feeling program."
  - text: "Fantastic, that makes all of my algorithms dance with joy!"

  utter_feel_better:
  - text: To make you feel better I'd be willing to tell you something about our company, Baltazar.

  utter_goodbye:
  - text: "Bye, take care"
  - text: "Sad to see you go!"
  - text: "Please don't leave! There must be something you haven't asked me yet!"

  utter_iamabot:
  - text: "My name is Techmobot. I was created by semi intelligent people. I'll prove it, ask your questions and be impressed with my genius."
  - text: My name is Techmobot, I was created by the engineers from Baltazar. I'll prove it, ask your questions and be impressed with my genius.
  - text: I'm Techmobot, created by Baltazar, cuddled with love of engine oil and warm, cozy updates.

actions:
- action_custom_fallback
- action_utter_chitchat
- action_utter_about_Baltazar

session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: true

Definition of done

rgstephens commented 3 years ago

The docs show that these responses should be in domain.yml. As a workaround discussed here, if you move the FAQ responses to the nlu.yml it will work.

boryslawskamaria commented 3 years ago

Hi, thanks for your reply. I have already tried and I keep getting the same error.

UserWarning: Action 'utter_chitchat' is listed as a response action in the domain file, but there is no matching response defined. Please check your domain. More info at https://rasa.com/docs/rasa/responses

rgstephens commented 3 years ago

I tested this workaround and it also worked for me. You need to make sure all of the utter_chitchat/ responses are no longer in your domain.yml.

redunau commented 3 years ago

If I move all of the utter_chitchat/ responses from domain.yml to the nlu.yml will then Rasa recognize them during model training? In all cases, I tried to do so and still keep receiving the same error message.

rgstephens commented 3 years ago

@redunau Moving them to the nlu has been confirmed to work by multiple people. If your project is available in a git repo please post and I will take a look.

boryslawskamaria commented 3 years ago

Hi, I've created a mini version of the bot with only one retrieval intent and moved said responses to the nlu file. It looks as follow:

nly.yml:

version: "2.0"

nlu:

responses: utter_chitchat/ask_howold:

rules.yml: version: "2.0"

rules:

config.yml

language: en

pipeline:

policies:

domain.yml

version: "2.0"

intents:

session_config: session_expiration_time: 60 carry_over_slots_to_new_session: true

I did what you mentioned, removed all the responses and moved the to the nlu.

Still keep getting the same error when training/testing:

.../.env/lib/python3.6/site-packages/rasa/shared/utils/io.py:93: UserWarning: Action 'utter_chitchat' is listed as a response action in the domain file, but there is no matching response defined. Please check your domain. More info at https://rasa.com/docs/rasa/responses

boryslawskamaria commented 3 years ago

hi, one more thing: I created a repo in which I set up a mini bot that exhibits the aforementioned problem. Feel free to download it and have a look https://github.com/boryslawskamaria/chatbots/tree/main/minibot

rgstephens commented 3 years ago

I'm going to update the title to reflect that response selectors work in spite of the warning.

gdeluc1 commented 3 years ago

Hi. Just thought to share my recent experience as I am interested by this ongoing topic. I have also been experimenting with retrieval intents and response selector since December trying all the available version of rasa in the process. I am currently using rasa 2.2.9. What I can see is that:

all works without warnings or errors as long as chitchat/responses are written in the nlu.yml file rather than in the domain.yml (as suggested by the current documentation).

Horizon733 commented 3 years ago

I also getting the same issue, as

Action 'utter_chitchat' is listed as a response action in the domain file, but there is no matching response defined. Please check your domain.

I have added response selector in config file:

- name: ResponseSelector
  retrieval_intent: chitchat
  scale_loss: false
  epochs: 100

Also, tried everything like to added responses for chitchat in nlu.yml. Previously in 2.1.2 version of Rasa I had created a folder as responses/responses.yml was working. But in Rasa 2.2.x it's not working since I have upgraded. Following are the versions:

jbartot commented 3 years ago

I am also having this issue - moving my responses to nlu.yml didn't help.

Melito46 commented 3 years ago

Hey I found a solution to this. Firstly, you don't need to move responses to nlu.yml. The only thing that needs to be added, so that you don't get the warning is to add the following under responses in domain.yml.

**utter_chitchat:

And the rest of it, you can write as it is

utter_chitchat/ask_weather:

and so on.

@jbartot @boryslawskamaria @Horizon733

Horizon733 commented 3 years ago

Hey I found a solution to this. Firstly, you don't need to move responses to nlu.yml. The only thing that needs to be added, so that you don't get the warning is to add the following under responses in domain.yml.

utter_chitchat: - text: "testing this solution"

And the rest of it, you can write as it is

utter_chitchat/ask_weather:

  • text: Oh, it does look sunny right now in Berlin. image: "https://i.imgur.com/vwv7aHN.png"
  • text: I am not sure of the whole week but I can see the sun is out today.

and so on.

@jbartot @boryslawskamaria @Horizon733

This doesn't look like a permanent solution it's kind of temporary. It would be better if the Rasa team fix this bug instead of making the domain realize by adding utter_chitchat or utter_faq. I hope you understand

Rohitdk88 commented 3 years ago

I am using rasa after months. First time into rasa 2+

I was trying to migrate my previous bot explained by Mady mantha in "rasa for beginners" course using this blog https://blog.rasa.com/updating-to-rasa-open-source-2-0/

I am facing same issue when form asks about slots.

muximuxi commented 3 years ago

same error

utsukprani commented 3 years ago

facing same issue when create a very simple FAQ test bot.

Rasa Version : 2.5.0 Minimum Compatible Version: 2.2.0a1 Rasa SDK Version : 2.5.0 Rasa X Version : None Python Version : 3.8.8 Operating System : Windows-10-10.0.18362-SP0

rey1024 commented 3 years ago

same issue

Hey I found a solution to this. Firstly, you don't need to move responses to nlu.yml. The only thing that needs to be added, so that you don't get the warning is to add the following under responses in domain.yml.

utter_chitchat: - text: "testing this solution"

And the rest of it, you can write as it is

utter_chitchat/ask_weather:

* text: Oh, it does look sunny right now in Berlin.
  image: "https://i.imgur.com/vwv7aHN.png"

* text: I am not sure of the whole week but I can see the sun is out today.

and so on.

@jbartot @boryslawskamaria @Horizon733

the warning is dissapear, but bot not responds

Bot loaded. Type a message and press enter (use '/stop' to exit): Your input -> what is your name? Your input -> Does it look sunny outside today? Your input ->

PsyQuant commented 3 years ago

I am also having this issue - moving my responses to nlu.yml didn't help. Rasa Version : 2.7.0 Minimum Compatible Version: 2.6.0 Rasa SDK Version : 2.7.0 Rasa X Version : None Python Version : 3.8.0

CYang828 commented 2 years ago

same issue Rasa Version : 2.8.0 Minimum Compatible Version: 2.8.0 Rasa SDK Version : 2.8.2 Rasa X Version : None Python Version : 3.7.11

hsm207 commented 2 years ago

same issue

Rasa Version : 2.8.14 Minimum Compatible Version: 2.8.9 Rasa SDK Version : 2.8.2 Rasa X Version : 0.42.6 Python Version : 3.8.10

tayfun commented 2 years ago

Fixes have been merged to 3.0.x, main and 2.0.x branches. Will be released in the next micros.