Rasa core: Multiple utterance not working - rasa-nlu

I am using Rasa 1.10.1
I have the following in my stories.md:
greet
utter_introduction
utter_ask_name_confirmation
And my domain.yml file contains responses like the following:
responses:
utter_introduction:
text: "Hi david, my name is Sara and I am calling from ABC bank, How are you doing today?"
text: "Hey there! my name is Sara and I am calling from ABC bank, How are you doing today?"
utter_ask_name_confirmation:
text: "I am just verifying that I am contacting the correct person."
My problem is only utter_introduction works.
The bot just ignores utter_ask_name_confirmation !
I read from some old threads that Rasa was having this bug in some previous version. But I am using 1.10.1 which I believe is a new version.
Can anyone help me in this?

Related

How to add buttons in RASA chatbot?

I want a chatbot with buttons for example, How are you feeling? Sad or Happy. I want two-buttons(one for happy and one for sad) here and get input from the user and followed by other questions. What will be the stories.md, nlu.md, domain.yml, and frontend python code?
For making a button the way you said, you have to change the domain.yml file only. In the templates section, after text add code like this.
buttons:
- title: "Happy"
payload: "utter_happy"
- title: "Sad"
payload: "utter_cheer_up"
With this, I will encourage you to check this GitHub repo to know about other types of chat bot Widget designed for Rasa Bots.
https://github.com/JiteshGaikwad/Chatbot-Widget
And in this repo, you will find some demo chatbots which are fully written in Python.
https://github.com/cedextech/rasa-chatbot-templates
Hope this helps.

Alexa Skill not recognized when tested on Echo

I was doing one of the tutorials (HelloWorld) to make a skill for the Echo and I followed the directions. When I tested the skill using the Service Simulator, I typed in
Alexa, tell Greeter to say hello
and that returned the following JSON response:
{
"version": "1.0",
"response": {
"outputSpeech": {
"type": "PlainText",
"text": "Hello World!"
},
"card": {
"content": "Hello World!",
"title": "Greeter",
"type": "Simple"
},
"shouldEndSession": true
},
"sessionAttributes": {}
}
I think that is the correct output. However, when I tried testing the skill on my Echo, Alexa replies "Sorry, I didn't your question." I went on the history and Alexa interpreted my command as "alexa tell greeter to say hello." It seems that Alexa is not recognizing the skill?
I am using Amazon Lambda to execute the code, so I checked the logs and the code was not executed when I spoke the command to above.
I replaced the app_id in the javascript file to the one that corresponds to my skill. I have also put the amazon skills kit as a trigger.
I also tried the other tutorials (ChemistryFlashCards and HistoryBuff), and Alexa replies "I'm not sure what you meant by that."
Not sure what is happening! Any guidance is appreciated!!
For your Echo / Dot / Tap device to correctly invoke your custom skill, the Language of your Interaction Model needs to match the region your lambda resource is deployed in. I had this issue, as I deployed lambda in EU-West1 (Ireland) but the default alnguage for the Interaction model is English (US). In the interaction model I added a new language of English (UK) and copied over my intents and utterances, then deleted the English US language, and my Echo Dot now correctly invoked my custom skill intents
Your device language and the language you are using in developer account for creating custom skills should be same. If your device is registered in English India then you have to add English india language in your custom skill.
Check language on your alexa app settings -> Your Echo device -> Language
Have you enabled testing with your device for your skill?
Once you have this enabled, you can check if it is properly associated with your device by going to the Skills section of the Alexa app and hitting "Your Skills" to see the list of skills that your Echo recognizes. You should see your skill with a little green dev tag on it.
I was developing in default en-US language with North Virginia region (for Lambda function) but was based in India. I even tried using US address in Alexa app, but it didn't worked.
At the end I added all the english languages(en-IN, en-CA, en-GB, en-EU) and copied the model JSON file which was created for en-US. Build each one of them separately and fill the Description -> Skill Preview details for each of them. This worked.
Most of the time, you cannot open your skill because it is not the same language as your current language you set for your Amazon echo device. Then if that doesn't work, you might have not enabled testing for your skill.
Also if you want to quickly enable your skill if you haven't done so, say Alexa(or whatever your wake word is), enable
I use the 5 point check list below and it always works:
1. Under Alexa Language Settings, add all the languages like English-US and English-IN that your Echo devices are likely to be configured with.
2. Freshly build the interaction model and deploy again.
3. Tell Alexa to ignore the Alexa-hosted skill: Instead of its auto-generated lambda code, it should use the external custom lambda that you created.
4. Ensure that the service end point is correct: Under the AWS Lambda ARN, enter your custom lambda ARN for each and every region you will be invoking the skill.
5. In the Alexa simulator, select all the languages one by one in the drop down and test them individually.
One problem related to Language settings.
Correct the language settings in your Echo Device using https://alexa.amazon.in/ or alexa app. Make sure language enabled in skill and device are equal. For example, use English India.
Reenable the skill
Go to https://alexa.amazon.in/. Make sure device appears online. Disable the skill in Your Skill section. Enable it again.
This should solve the problem.

Rails 3.1 - Devise inserting address into subject line of confirmation email

I'm using rails 3.1 with Devise. When an account confirmation email goes out, it is received with the following subject line:
Subject: [["test13#test.com"]]MySite Account Confirmation Instructions
I've modified the corresponding entry in config/locals/devise.en.yml like this:
mailer:
confirmation_instructions:
subject: 'MySite Account Confirmation Instructions'
I don't want the '[["test13#test.com"]] in the email subject line. How can I get Devise to not put it there? BTW I really don't want to have to create some custom mailer that overrides Devises' stock mailer... Big extra bonus points for an answer that avoids anything to do with custom mailers. But if that is the only way, I need to know that too...
My guess is that the [["test13#test.com"]] should actually only show up in development mode, since that's the format of ActionMailer's DevelopmentMailInterceptor (see the notes in RailsCast 206)
The email address between brackets indicates the address to which the email would have been sent on production. It instead sends it to you at an email specified in your DevelopmentMailInterceptor.
The mail subject is generated in Devise::Mailers::Helpers.headers_for (source code here), so the most straightforward way would be monkey-patching this method.
This was a strange one... Had to reboot my Mac, after which the problem was gone.

VB6 with MAPI for Lotus Notes

Everybody,
I need to incorporate mail functionality into a VB6 application. The default mail system is Lotus Notes 6.5. I have read that this version of Lotus Notes is MAPI-enabled.
Here is a weird thing I see. When the user clicks a SendMail button, the below code is launched:
MAPISession1.SignOn
With MAPIMessages1
.SessionID = MAPISession1.SessionID
.Compose
.RecipAddress = "John Smith"
.MsgSubject = "Test memo"
.MsgNoteText = "This is testing data!"
.AddressResolveUI = True
.ResolveName
.Send True
End With
This code opens a window in Lotus Notes (this is what I expected) but
- the To address box contains the recipient address followed by the body text on the first line and the recipient address on the second line:
John SmithThis is testing data!
John Smith
-- the Body section is blank.
Is there anything I can do to fix it or Lotus Notes is incompatible with MAPI.
Thanks,
Lev
I don't have access to the appropriate tools, so I can't test this, but try moving the .ResolveName line up right after you set the recipient address, like so:
.Compose
.RecipAddress = "John Smith"
.ResolveName
Lotus Notes is compatible with Simple MAPI, not full (extended) MAPI, but the code you're using appears to be Simple MAPI.
I did a quick bit of research and supposedly Simple MAPI is supported in Lotus Notes 6. However, a little more digging led me to this post where someone had trouble using MAPI in r6, and opted to use COM instead. I've only worked with COM, but I can say it does give you a lot of flexibility if you're up for changing your code.

How do I process ActiveSupport::Notifications events?

I've looked at the documentation for ActiveSupport::Notifications but I'm a little unclear about how to use it. Here's what I have right now:
class Foo
...
def xyz
# other stuff
ActiveSupport::Notifications.instrument(:interesting)
expensive_operation(123, 'apple') # We want to instrument this.
end
end
end
What I would like to do is have another class, Auditor, invoke puts "event #{event}" whenever the interesting event is raised. How do I do that?
A good resources is from railscast.com
http://railscasts.com/episodes/249-notifications-in-rails-3
Another resource that you can take a look at is Jose Valim's book Crafting Rails Application.
Here are a few good resources to get you started:
Using ActiveSupport::Notifications and ActiveSupport::Concern To Create An Audit Trail
Digging Deep with ActiveSupport::Notifications
ActiveSupport::Notifications API Documentation
Active Support Instrumentation Rails Guide - This contains a list of all available notifications that you can subscribe to.
RailsCasts #249 - Notifications in Rails 3

Resources