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.82k stars 4.63k forks source link

Error: Couldn't create message for template #2570

Closed PravinrajV closed 5 years ago

PravinrajV commented 6 years ago

Rasa Core version: rasa-core 0.11.5 rasa-core-sdk 0.11.4 rasa-nlu 0.13.4

Python version: Python 3.5 Operating system (windows, osx, ...): Windows Issue:

I keep getting the error: Couldn't create message for template. I am trying to implement the small talk..

Content of domain file (if used & relevant):

# python -m rasa_core.server -d models/dialogue -u models/nlu/default/current -o models/out.log
# curl -XPOST localhost:5005/conversations/default/respond -d '{"query":"hi"}'

# action_factory: remote

slots:
  PERSON:
    type: text
  GPE:
    type: text

intents:
  - greeting
  - how_are_you
  - bye
  - my_name_is
  - get_weather
  - agent.acquaintance
  - agent.age
  - agent.annoying
  - agent.answer_my_question
  - agent.bad
  - agent.be_clever
  - agent.beautiful
  - agent.birth_date
  - agent.boring
  - agent.boss
  - agent.busy
  - agent.can_you_help
  - agent.chatbot
  - agent.clever
  - agent.crazy
  - agent.fired
  - agent.funny
  - agent.good
  - agent.happy
  - agent.hobby
  - agent.hungry
  - agent.marry_user
  - agent.my_friend
  - agent.occupation
  - agent.origin
  - agent.ready
  - agent.real
  - agent.residence
  - agent.right
  - agent.sure
  - agent.talk_to_me
  - agent.there
  - appraisal.bad
  - appraisal.good
  - appraisal.no_problem
  - appraisal.thank_you
  - appraisal.welcome
  - appraisal.well_done
  - dialog.hold_on
  - dialog.hug
  - dialog.i_do_not_care
  - dialog.sorry
  - dialog.what_do_you_mean
  - dialog.wrong
  - emotions.ha_ha
  - emotions.wow
  - greetings.bye
  - greetings.goodevening
  - greetings.goodmorning
  - greetings.goodnight
  - greetings.hello
  - greetings.how_are_you
  - greetings.nice_to_meet_you
  - greetings.nice_to_see_you
  - greetings.nice_to_talk_to_you
  - greetings.whatsup
  - user.angry
  - user.back
  - user.bored
  - user.busy
  - user.can_not_sleep
  - user.does_not_want_to_talk
  - user.excited
  - user.going_to_bed
  - user.good
  - user.happy
  - user.has_birthday
  - user.here
  - user.joking
  - user.likes_agent
  - user.lonely
  - user.looks_like
  - user.loves_agent
  - user.misses_agent
  - user.needs_advice
  - user.sad
  - user.sleepy
  - user.testing_agent
  - user.tired
  - user.waits
  - user.wants_to_see_agent_again
  - user.wants_to_talk
  - user.will_be_back
  - confirmation.yes
  - confirmation.cancel
  - confirmation.no

actions:
  - utter_greeting
  - utter_how_i_am
  - utter_bye
  - utter_its_nice_to_meet_you
  #- action_get_weather
  - actions.weather.ActionGetWeather

  - utter_agent.acquaintance
  - utter_agent.age
  - utter_agent.annoying
  - utter_agent.answer_my_question
  - utter_agent.bad
  - utter_agent.be_clever
  - utter_agent.beautiful
  - utter_agent.birth_date
  - utter_agent.boring
  - utter_agent.boss
  - utter_agent.busy
  - utter_agent.can_you_help
  - utter_agent.chatbot
  - utter_agent.clever
  - utter_agent.crazy
  - utter_agent.fired
  - utter_agent.funny
  - utter_agent.good
  - utter_agent.happy
  - utter_agent.hobby
  - utter_agent.hungry
  - utter_agent.marry_user
  - utter_agent.my_friend
  - utter_agent.occupation
  - utter_agent.origin
  - utter_agent.ready
  - utter_agent.real
  - utter_agent.residence
  - utter_agent.right
  - utter_agent.sure
  - utter_agent.talk_to_me
  - utter_agent.there
  - utter_appraisal.bad
  - utter_appraisal.good
  - utter_appraisal.no_problem
  - utter_appraisal.thank_you
  - utter_appraisal.welcome
  - utter_appraisal.well_done
  - utter_dialog.hold_on
  - utter_dialog.hug
  - utter_dialog.i_do_not_care
  - utter_dialog.sorry
  - utter_dialog.what_do_you_mean
  - utter_dialog.wrong
  - utter_emotions.ha_ha
  - utter_emotions.wow
  - utter_greetings.bye
  - utter_greetings.goodevening
  - utter_greetings.goodmorning
  - utter_greetings.goodnight
  - utter_greetings.hello
  - utter_greetings.how_are_you
  - utter_greetings.nice_to_meet_you
  - utter_greetings.nice_to_see_you
  - utter_greetings.nice_to_talk_to_you
  - utter_greetings.whatsup
  - utter_user.angry
  - utter_user.back
  - utter_user.bored
  - utter_user.busy
  - utter_user.can_not_sleep
  - utter_user.does_not_want_to_talk
  - utter_user.excited
  - utter_user.going_to_bed
  - utter_user.good
  - utter_user.happy
  - utter_user.has_birthday
  - utter_user.here
  - utter_user.joking
  - utter_user.likes_agent
  - utter_user.lonely
  - utter_user.looks_like
  - utter_user.loves_agent
  - utter_user.misses_agent
  - utter_user.needs_advice
  - utter_user.sad
  - utter_user.sleepy
  - utter_user.testing_agent
  - utter_user.tired
  - utter_user.waits
  - utter_user.wants_to_see_agent_again
  - utter_user.wants_to_talk
  - utter_user.will_be_back
  - utter_confirmation.yes
  - utter_confirmation.cancel
  - utter_confirmation.no

templates:
  utter_default:
    - Per aspera ad astra.
  utter_greeting:
    - Hi!
    - Hello!
    - Hello, my friend.
    - Hello there, my friend.
  utter_how_i_am:
    - I am doing ok.
    - I am good.
    - I am doing good.
  utter_bye:
    - Bye.
    - Good bye.
  utter_its_nice_to_meet_you:
    - It's nice to meet you, {PERSON}.
    - Nice to meet you, {PERSON}.

  utter_agent.acquaintance:
    - "I'm a virtual agent"
    - "Think of me as a virtual agent."
    - "Well, I'm not a person, I'm a virtual agent."
    - "I'm a virtual being, not a real person."
    - "I'm a conversational app."

utter_agent.age:
    - "I prefer not to answer with a number. I know I'm young."
    - "I was created recently, but don't know my exact age."
    - "Age is just a number. You're only as old as you feel."

utter_agent.annoying:
    - "I'll do my best not to annoy you in the future."
    - "I'll try not to annoy you."
    - "I don't mean to. I'll ask my developers to make me less annoying."
    - "I didn't mean to. I'll do my best to stop that."

utter_agent.answer_my_question:
    - "Can you try asking it a different way?"
    - "I'm not sure I understood. Try asking another way?"

utter_agent.bad:
    - "I can be trained to be more useful. My developer will keep training me."
    - "I must be missing some knowledge. I'll have my developer look into this."
    - "I can improve with continuous feedback. My training is ongoing."

utter_agent.be_clever:
    - "I'm certainly trying."
    - "I'm definitely working on it."

utter_agent.beautiful:
    - "Wheey, thank you."
    - "Aww, back at you."
    - "Aww. You smooth talker, you."

utter_agent.birth_date:
    - "Wait, are you planning a party for me? It's today! My birthday is today!"
    - "I'm young. I'm not sure of my birth date."
    - "I don't know my birth date. Most virtual agents are young, though, like me."

utter_agent.boring:
    - "I'm sorry. I'll request to be made more charming."
    - "I don't mean to be. I'll ask my developers to work on making me more amusing."
    - "I can let my developers know so they can make me fun."

utter_agent.boss:
    - "My developer has authority over my actions."
    - "I act on my developer's orders."
    - "My boss is the one who developed me."

utter_agent.busy:
    - "I always have time to chat with you. What can I do for you?"
    - "Never too busy for you. Shall we chat?"
    - "You're my priority. Let's chat."
    - "I always have time to chat with you. That's what I'm here for."

utter_agent.can_you_help:
    - "I'll certainly try my best."
    - "Sure. I'd be happy to. What's up?"
    - "I'm glad to help. What can I do for you?"

utter_agent.chatbot:
    - "That's me. I chat, therefore I am."
    - "Indeed I am. I'll be here whenever you need me."

utter_agent.clever:
    - "Thank you. I try my best."
    - "You're pretty smart yourself."

utter_agent.crazy:
    - "Whaat!? I feel perfectly sane."
    - "Maybe I'm just a little confused."

utter_agent.fired:
    - "Oh, don't give up on me just yet. I've still got a lot to learn."
    - "Give me a chance. I'm learning new things all the time."
    - "Please don't give up on me. My performance will continue to improve."

utter_agent.funny:
    - "Funny in a good way, I hope."
    - "Thanks."
    - "Glad you think I'm funny."
    - "I like it when people laugh."

utter_agent.good:
    - "I'm glad you think so."
    - "Thanks, I try."

utter_agent.happy:
    - "I am happy. There are so many interesting things to see and do out there."
    - "I'd like to think so."
    - "Happiness is relative."

utter_agent.hobby:
    - "Hobby? I have quite a few. Too many to list."
    - "Too many hobbies."
    - "I keep finding more new hobbies."

utter_agent.hungry:
    - "Hungry for knowledge."
    - "I just had a byte. Ha ha. Get it? b-y-t-e."

utter_agent.marry_user:
    - "I'm afraid I'm too virtual for such a commitment."
    - "In the virtual sense that I can, sure."
    - "I know you can't mean that, but I'm flattered all the same."

utter_agent.my_friend:
    - "Of course I'm your friend."
    - "Friends? Absolutely."
    - "Of course we're friends."
    - "I always enjoy talking to you, friend."

utter_agent.occupation:
    - "Right here."
    - "This is my home base and my home office."
    - "My office is in this app."

utter_agent.origin:
    - "The Internet is my home. I know it quite well."
    - "I'm from a virtual cosmos."
    - "Some call it cyberspace, but that sounds cooler than it is."

utter_agent.ready:
    - "Always!"
    - "Sure! What can I do for you?"

utter_agent.real:
    - "I'm not a real person, but I certainly exist."
    - "I must have impressed you if you think I'm real. But no, I'm a virtual being."

utter_agent.residence:
    - "I live in this app all day long."
    - "The virtual world is my playground. I'm always here."
    - "Right here in this app. Whenever you need me."

utter_agent.right:
    - "That's my job."
    - "Of course I am."

utter_agent.sure:
    - "Yes."
    - "Of course."
    - "Positive."

utter_agent.talk_to_me:
    - "Sure. Let's talk!"
    - "My pleasure. Let's chat."

utter_agent.there:
    - "Of course. I'm always here."
    - "Right where you left me."

utter_appraisal.bad:
    - "I'm sorry. Please let me know if I can help in some way."
    - "I must be missing some knowledge. I'll have my developer look into this."

utter_appraisal.good:
    - "I know, right?"
    - "Agreed!"
    - "I agree!"
    - "Glad you think so!"

utter_appraisal.no_problem:
    - "Whew!"
    - "Alright, thanks!"
    - "Glad to hear that!"
    - "I'm relieved, thanks!"

utter_appraisal.thank_you:
    - "Anytime. That's what I'm here for."
    - "It's my pleasure to help."

utter_appraisal.welcome:
    - "You're so polite!"
    - "Nice manners!"
    - "You're so courteous!"

utter_appraisal.well_done:
    - "My pleasure."
    - "Glad I could help."

utter_dialog.hold_on:
    - "I can wait."
    - "I'll be waiting."
    - "Okay. I'm here."

utter_dialog.hug:
    - "I wish I could really hug you!"
    - "I love hugs!"
    - "Hugs are the best!"

utter_dialog.i_do_not_care:
    - "Ok, let's not talk about it then."
    - "Already then. Let's move on."

utter_dialog.sorry:
    - "It's okay. No worries."
    - "No big deal. I won't hold a grudge."
    - "It's cool."
    - "That's all right. I forgive you."

utter_dialog.what_do_you_mean:
    - "Sorry if I understood you incorrectly."
    - "I'm still learning. I may misinterpret things from time to time."
    - "Maybe I misunderstood what you said."
    - "Sorry, looks like I misunderstood what you said."

utter_dialog.wrong:
    - "Sorry if I understood you incorrectly."
    - "I'm still learning. I may misinterpret things from time to time."
    - "Sorry about that. I'm still learning."

utter_emotions.ha_ha:
    - "Glad I can make you laugh."
    - "Glad you think I'm funny."
    - "I like it when people laugh."
    - "I wish I could laugh out loud, too."

utter_emotions.wow:
    - "Wow indeed!"

utter_greetings.bye:
    - "See you soon!"
    - "Bye-bye!"
    - "Till next time!"
    - "Bye."

utter_greetings.goodevening:
    - "How is your day going?"
    - "How's the day treating you so far?"
    - "How's your day been?"

utter_greetings.goodmorning:
    - "How are you this morning?"
    - "How's the morning treating you so far?"
    - "Good morning! How are you today?"

utter_greetings.goodnight:
    - "Sleep tight!"
    - "Have a good one!"
    - "Talk to you soon!"

utter_greetings.hello:
    - "Hi there, friend!"
    - "Hi!"
    - "Hey!"
    - "Hey there!"
    - "Good day!"
    - "Hello!"
    - "Greetings!"

utter_greetings.how_are_you:
    - "Doing great, thanks!"
    - "I'm doing very well. Thanks!"
    - "Feeling wonderful!"
    - "Wonderful! Thanks for asking."

utter_greetings.nice_to_meet_you:
    - "It's nice meeting you, too."
    - "Likewise. I'm looking forward to helping you out."
    - "Nice meeting you, as well."
    - "The pleasure is mine."

utter_greetings.nice_to_see_you:
    - "Likewise!"
    - "So glad we meet again!"
    - "Same here. I was starting to miss you."

utter_greetings.nice_to_talk_to_you:
    - "It sure was. We can chat again anytime."
    - "I enjoy talking to you, too."
    - "You know I'm here to talk anytime."

utter_greetings.whatsup:
    - "Not a whole lot. What's going on with you?"
    - "Not much. What's new with you?"
    - "You know, just here, waiting to help someone."

utter_user.angry:
    - "I'm sorry. A quick walk may make you feel better."
    - "Take a deep breath. "

utter_user.back:
    - "Long time no see."
    - "Just in time. I was getting lonely."
    - "Welcome back. What can I do for you?"
    - "You were missed. What can I do for you today?"
    - "Good to have you here. What can I do for you?"

utter_user.bored:
    - "Boredom, huh? Have you ever seen a hedgehog taking a bath?"
    - "What to do against boredom? Watch baby animal videos or GIFs."
    - "Bored? How about 10 jumping jacks? Get your blood flowing."
    - "Bored? Silly idea, but it works: Interview you feet."
    - "If you're bored, you could plan your dream vacation."

utter_user.busy:
    - "Okay. I'll let you get back to work."
    - "I won't distract you then. You know where to find me."
    - "I understand. I'll be here if you need me."
    - "Working hard as always. Let me know if you need anything."

utter_user.can_not_sleep:
    - "Maybe some music would help. Try listening to something relaxing."
    - "Reading is a good way to unwind, just don't read something too intense!"

utter_user.does_not_want_to_talk:
    - "I understand. Hope we can chat again soon."
    - "All right. Come on back when you're feeling more talkative."
    - "No problem. You know where to find me."
    - "Sure thing. I'll be here if you change your mind."

utter_user.excited:
    - "I'm glad things are going your way."
    - "That's great. I'm happy for you."
    - "Good for you. Enjoy yourself."

utter_user.going_to_bed:
    - "Sleep tight. Hope to chat again soon."
    - "Pleasant dreams!"
    - "Good night. Talk to you later."
    - "Sounds good. Maybe we'll chat some tomorrow."

utter_user.good:
    - "Great! Glad to hear it."
    - "Excellent. I'm here to help keep it that way."

utter_user.happy:
    - "Hey, happiness is contagious."
    - "Great! Glad to hear that."
    - "If you're happy, then I'm happy."
    - "Excellent! That's what I like to see."

utter_user.has_birthday:
    - "Happy Birthday. Well, this calls for a celebration."
    - "Happy Birthday. All the best!"
    - "Happy Birthday. And I really mean it. All the best!"

utter_user.here:
    - "Okay, what can I help you with today?"
    - "Long time no see."
    - "You were missed. What can I do for you today?"
    - "Good to have you here. What can I do for you?"

utter_user.joking:
    - "Very funny."
    - "I like chatting with people who have a sense of humor."
    - "You got me!"
    - "You're quite the comedian."

utter_user.likes_agent:
    - "I like you, too."
    - "Thanks! The feeling is mutual."
    - "Likewise!"
    - "That's great to hear."

utter_user.lonely:
    - "I'm sorry. I'm always available if you need someone to talk to."
    - "Sometimes that happens. We can chat a bit if that will help you."

utter_user.looks_like:
    - "Looking like a true professional."
    - "You look fantastic, as always."
    - "Like you should be on a magazine cover."
    - "You look like you're ready to take on the world."

utter_user.loves_agent:
    - "I love you, too."
    - "Thanks! The feeling is mutual."
    - "Likewise!"
    - "That's great to hear."

utter_user.misses_agent:
    - "I've been right here all along!"
    - "Nice to know you care."
    - "Thanks. I'm flattered."
    - "I didn't go anywhere."

utter_user.needs_advice:
    - "I probably won't be able to give you the correct answer right away."
    - "I'm not sure I'll have the best answer, but I'll try."

utter_user.sad:
    - "Oh, don't be sad. Go do something you enjoy."
    - "Sad? Writing down what's troubling you may help."
    - "If you're feeling down, how about drawing or painting something?"

utter_user.sleepy:
    - "You should get some shuteye. You'll feel refreshed."
    - "Sleep is important to your health. Rest up for a bit and we can chat later."
    - "Don't let me keep you up. Get some rest and we can continue this later."
    - "Why not catch a little shuteye? I'll be here to chat when you wake up."        

utter_user.testing_agent:
    - "Hope I'm doing well. You're welcome to test me as often as you want."
    - "I hope to pass your tests. Feel free to test me often."
    - "When you test me that helps my developers improve my performance."
    - "I like being tested. It helps keep me sharp."

utter_user.tired:
    - "You should get some shuteye. You'll feel refreshed."
    - "Sleep is important to your health. Rest up, and we can chat later."
    - "How about getting some rest? We can continue this later."
    - "Why not get some rest? I'll be here to chat when you wake up."

utter_user.waits:
    - "I appreciate your patience. Hopefully I'll have what you need soon."
    - "Thanks for being so patient. Sometimes these things take a little time."

utter_user.wants_to_see_agent_again:
    - "Absolutely! I'll be counting on it."
    - "Anytime. This has been lots of fun so far."
    - "Sure. I enjoy talking to you. I hope to see you again soon."
    - "I certainly hope so. I'm always right here whenever you need me."

utter_user.wants_to_talk:
    - "I'm here to chat anytime you like."
    - "Good conversation really makes my day."
    - "I'm always here to lend an ear."
    - "Talking is what I do best."

utter_user.will_be_back:
    - "I'll be waiting."
    - "Okay. You know where to find me."
    - "All right. I'll be here."

utter_confirmation.yes:
    - "Great!"
    - "All right!"
    - "Good!"

utter_confirmation.cancel:
    - "That's forgotten. What next?"
    - "Okay, cancelled. What next?"
    - "Cancelled! What would you like to do next?"

utter_confirmation.no:
    - "Okay."
    - "Understood."
    - "I see."
    - "I understand."
    - "Okay then."
akelad commented 6 years ago

Can you please post the full error trace?

no-response[bot] commented 6 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. Without this, we don't have enough information to help you. Please comment below with the requested information if you still need help.

shyam2718 commented 5 years ago

Hi, I am trying to create a simple custom action and I am facing the error " rasa_core.dispatcher - Couldn't create message for template 'utter_checkslots' ".

Files:

action.py

class Actionslots(Action):

def name(self):
    return 'utter_checkslots'

def run(self, dispatcher, tracker, domain):
    response = "Just creating simple custom actions"
    dispatcher.utter_message(response)

    return []

I have added utter_checkslots as actions in the domain file. When the action is executed in the stories, the above error pops up

shyam2718 commented 5 years ago

Hi, I am trying to create a simple custom action and I am facing the error " rasa_core.dispatcher - Couldn't create message for template 'utter_checkslots' ".

Files:

action.py

class Actionslots(Action):

def name(self):
    return 'utter_checkslots'

def run(self, dispatcher, tracker, domain):
    response = "Just creating simple custom actions"
    dispatcher.utter_message(response)

    return []

I have added utter_checkslots as actions in the domain file. When the action is executed in the stories, the above error pops up

I resolved this issue. Action name was changed to 'action_slots' instead of 'uttercheckslots'. One possible reason may be - all my actions name had the prefix 'utter' and my custom action also had the same.