wit.ai understanding tab is not resulting expected intent roles - facebook

I am developing an app using wit ai and facebook messenger, everything is working as expected but I am stuck on a expression which is always returning wrong role.
I have added similar expression for that intent but when I test the same sentence it returns wrong role. Please see screenshot attached
Below image shows that expression is properly validated, here mumbai is recognized as wit/location:origin
But When I test the same expression, it only returns location against mumbai rather than location:origin..
Any help ?

I checked and your training was stuck for some reason. I just restart it manually and it works now.
Training Status Icon

Related

Why snipcart digital goods verification fails

I’ve been stuck on this for a while now.
I’m trying to set up a digital products webshop, using Vue + Strapi + Snipcart.
Here’s the error I’m encountering once I try to checkout with a product:
browser error message from snipcart
However, If I test with a normal product that doesn’t have guid attached to it - everything is fine and the transaction goes through.
I use snipcart’s JSON crawler. Therefore I’ve created an endpoint from my API with all products.
JSON structure
{
"_id":"618ff1327f4e2824f09134cf",
"price":123,
"file_guid":"7571fd60-a403-404c-b27a-616c0856e1ee",
"id":"618ff1327f4e2824f09134cf"
}
...
The only thing that comes to my mind - is that I’m not correctly referencing guid in my JSON document
I’ve also tried just guid instead file_guid - it didn’t work.
Lastly this is my “Add to cart” button code:
<v-btn dark depressed class="mt-5 snipcart-add-item"
:data-item-id="productDetails.id"
:data-item-description="productDetails.shortDescription"
:data-item-price="productDetails.price"
:data-item-image="apiUrl + productDetails.image.url"
:data-item-name="productDetails.title"
:data-item-url="'https://92ef-91-101-56-233.ngrok.io/products/snipcart'"
:data-item-max-quantity="1"
:data-item-min-quantity="1"
:data-item-file-guid="productDetails.file_guid"
>ADD TO CART</v-btn>
Everything is running and tested locally using ngrok.
Does anyone have any ideas of what I’m doing wrong? Any help is highly appreciated.
Thanks.
I’ve managet to figure out the issue. As I suspected I was referencing guid wrong (file_guid and guid), that’s why snipcart’s JSON crawler was returning me the error.
I’ve found in some random repository that You must use the name fileGuid in your API otherwise crawler won’t find it.

Using slot in Watson Assistant and Node RED

I'm building a chatbot on Telegram with Watson Assistant and Node RED. I need to take a date and time from the user for booking an appointment, so I used a slot that require the insertion of the two information. Using the trial chatbot offered by Watson, I have no problem with slot; but using Node RED, I can't go beyond entering the date. Through the debug, I saw that after entering the date, then after running the first slot, this error is returned "msg.payload.content is empty". Moreover, going to see the body of the output message returned by the assistant, the msg.payload.output.generic field is empty. On the other hand, it should contain the response of the assistant who requests, after having entered the date, also to insert the time. It seems that the bot is stuck on entering the date, but in reality I don't think so, because in the trial chatbot, it works perfectly.
What could be the problem?
Neither the Assistant V1 nor the V2 set or look at msg.payload.content. On input they look at msg.payload and on exit they assign the response from Watson Assistant to msg.payload.
If you are getting a "msg.payload.content" is empty error, then that will be happening somewhere in your flow. Most likely at the end where you are trying to process the response. If msg.payload.content is empty then the assistant dialog is not returning any output. This is strange as it should be returning the prompt for the currently empty slot.
What does msg.payload look like?
Are you using the V1 or the V2 node, and which version of node-red-node-watson nodes are you using? You can tell, by going to the palette.
Both V1 and V2 nodes, however, have been tested with slots, and the response does end up on msg.payload.content. Current released version of node-red-node-watson is 0.9.0.

Work Item transition is not returned in VSTS with Rest API

For some reason I cant't get the transitions (next available states) for a work item with a rest call.
I tried exactly what is in the document:
transitions
Here is my REST call:
BASE_URL/_apis/wit/workitemtransitions?ids=14&api-version=4.1-preview.1
The BASE_URL works with other calls, the id 14 could be loaded also, so it exits, but i don't get back any result if i want to get the transitions(Usual Page not found is returned).
What is the problem here?
Tested on my side and everything works as expected.
Generally if the base url is incorrect you will receive the Page not found message. So please double check if you have entered the correct base url... (maybe a typo?)
Another possibility is that no transitions defined for the specific work item type...

Facebook API returns empty response only from specific IP

Suddenly simple Facebook Graph API calls started to return an empty result. The node I'm calling is a simple search page by name:
`https://graph.facebook.com/search?type=page&fields=profile_picture,username,id,name,likes,category,talking_about_count&access_token=<APP_TOKEN>&limit=10&q=stackoverflow`
It just started to return an empty result set when called from my server:
{"data":[]}
When I'm calling it from my personal computer browser, it works just fine.
I don't see any notification in Facebook Manage Apps page. What can be the reason? Is there any way I can see any error in this Graph API result?
UPDATE: suddenly it started working again, after it was down for at least 2 hours. Is there any way I can make these calls through client side JS? Any way to avoid to exposure of my APP_TOKEN?
UPDATE2: It stopped working again, and although I haven't identified the reason, I did figure when replacing the with a , it does work. The documentation actually says to use an APP_TOKEN.

PayPal Sandbox Blank Address Error

I just recently started working with the PayPal API to start processing credit cards for a client and have run into an odd issue. I managed to get everything mostly working (the 400 Bad Request error that is all over SO is still outstanding for me) minus one thing. When I try to run a CC against the sandbox area with nothing specified for line 2 of the address I see the following error get logged:
Error Response: {"name":"VALIDATION_ERROR","details":[{"field":"payer.funding_instruments[0].credit_card.billing_address.line2","issue":"Must not be blank"}],"message":"Invalid request - see details","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR","debug_id":"cbaa2c4dfdb77"}
Why would address 2 be required? Their own documentation (https://developer.paypal.com/webapps/developer/docs/api/) says it isn't so I'm completely lost here.
This is using the RestAPISDK library downloaded from their GitHub instance and everything I'm doing is in C#.
When you have a blank value in a REST API call it will return an error. It isn't required to provide a line2 value but if you include the variable with a blank value the system will flip out. Remove the variable entirely and you should be good to go.