Iss one intent can have on 50 expressions on wit.ai? - bots

I have created an application using Wit.ai but when i try to fetch intents from wit . I am getting only 50 intent through API whilte in my wit app i can see more than 50

Related

How to read the data passed from webchat payload to the bot in bot framework composer in dirext line api?

I am trying to read a param passed from webchat by using directline api to read those values for steering the conversation in bot.
But I am getting 'A scope of req was not found' when accessing req.qury.passedValue.

How do you send a campaign to a custom channel in pinpoint?

I've created a separate "custom channel" in AWS Pinpoint using the example documentation (beta), but the campaigns I send don't match any endpoints.
I've updated the project to use my Lambda function:
aws pinpoint update-application-settings \
--application-id my-pinpoint-id \
--write-application-settings-request '{\"CampaignHook\": { \"LambdaFunctionName\": \"arn:aws:lambda:us-east-1:my-application-id:function:MyLambdaFunction\", \"Mode\": \"DELIVERY\" }}'
... and I've created a segment with various endpoint ChannelTypes, e.g. SMS,
EMAIL, APNS, GCM, CUSTOM. But when I send anything to that channel via the Console no notifications get sent---it says "Endpoints targeted 0". I thought that all endpoints would go through my Lambda function....
Any idea how to send something to a segment via a custom channel?

ChatBot not working after Deploying on Azure - Internal server error

I have deployed a chatbot with LUIS and QnA Maker. It works perfectly locally when I run it on Emulator. It loads up the adaptive cards at start of the chat and I get correct replies from LUIS.
However when I deploy the bot on Azure and test it on Web chat it gives the following error:
There was an error sending this message to your bot: HTTP status code InternalServerError
This is how my web.config looks like:
<configuration>
<appSettings>
<!-- update these with your BotId, Microsoft App Id and your Microsoft App Password-->
<add key="BotId" value="BotLuis" />
<add key="MicrosoftAppId" value="9f9564ef-d627-450f-b943-98b7338c0f31" />
<add key="MicrosoftAppPassword" value="myapp-password" />
</appSettings>
I get the values for AppID and AppPassword from the Applications setting of the web bot I created on Azure. I know they are correct since I used these values to setup locally using Emulator.
I deploy the code from github to Azure. My bot loads up just fine (The adaptive cards show) on azure web chat but after that any input I give to it, whether it is interactive card or chat command, I get the above error.
The application Insight shows the following exception:
POST to BotLuis failed: POST to the bot's endpoint failed with HTTP status 500
Problem Id:System.Exception at Microsoft.Bot.ChannelConnector.BotAPI+d__31.MoveNext
The developers tool console shows this when I interact with the bot:
https://webchat.botframework.com/v3/directline/conversations/3NgflndFbpzCRDtnMdZpjf-g/activities 502 (Bad Gateway)
if you paste the above link in a browser this is what you will get:
{
"error": {
"code": "BadArgument",
"message": "Missing token or secret"
}
}
I am lost at this point. I can understand the problem but I don't know how to go forward. Am I supposed to add the messaging endpoint of my bot in my code somewhere?
A link to github repo of the code:here
Bot State Service retired on March 31st, 2018.
Therefore your sample is missing state storage when you run it on Azure, while it will work locally.
To make your sample work, simply add the following lines to your Global.asax.csfile.
protected void Application_Start()
{
RegisterBotDependencies();
GlobalConfiguration.Configure(WebApiConfig.Register);
var store = new InMemoryDataStore();
Conversation.UpdateContainer(
builder =>
{
builder.Register(c => store)
.Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore)
.AsSelf()
.SingleInstance();
builder.Register(c => new CachingBotDataStore(store,
CachingBotDataStoreConsistencyPolicy
.ETagBasedConsistency))
.As<IBotDataStore<BotData>>()
.AsSelf()
.InstancePerLifetimeScope();
});
}
Please note that this sample uses InMemory storage and is therefore not intended for production use. Following the blog post, you can easily switch over to Azure Table storage or CosmosDB.
I've cloned your repository, added these lines of code and deployed it to a new bot instance on Azure. Webchat test was successful.
Summary
Taken from above blog post.
We’ve been encouraging bot developers using the Bot Framework to use their own custom state service for a while. The default Bot Framework State service was intended for prototyping purposes only, and not designed to accommodate production bots. The state service will be deprecated on March 31, 2018 and will no longer be supported. Bot developers moving forward will be able to prototype their bots using temporary local memory storage as described in this article. Creating your own custom state service for your bot provides multiple benefits including improved latency and direct control over your bot’s conversation state and contextual user conversation state information, and we’ve provided multiple resources to guide you to do so. We appreciate the feedback we’ve been receiving from the bot developer community, which has helped us a lot in improving the Bot Framework as a whole. We also hope that we can continue helping you – the bot developer community, create better and better bot experiences for your users.

How to post to a webchat using direct line in Microsoft Bot Service?

In the test web chat in azure portal, I get the bot to speak back to me the conversation id by getting it from session.message.address.conversation.id.
I wish to then view activities for this conversation id using the method described here:
https://learn.microsoft.com/en-us/bot-framework/rest-api/bot-framework-rest-direct-line-3-0-send-activity
(POST https://directline.botframework.com/v3/directline/conversations/abc123/activities
)
However, I get the following error:
{
"error": {
"code": "BadArgument",
"message": "Unknown conversation"
}
}
I have also tried:
POST https://webchat.botframework.com/v3/directline/conversations/9323c31ab1ba42328edc9191621f9c9c/activities
Any help on how I can use direct line to post/view activities for a webchat?
Thanks!
Explain your issue
I cannot reproduce your issue with POST conversations. Actually, I can only reproduce your issue with following step:
generate directline token => leverage the response conversationId and token directly call Retrieve activities with HTTP GET with:
GET https://directline.botframework.com/v3/directline/conversations/abc123/activities
Authorization: Bearer token
The correct steps are:
generate token => POST to Start a conversation => GET to Retrieve activities with HTTP GET.
For your requirement
I don't think we can interrupt outside of the conversion, as the description of Generate a Direct Line token
To generate a Direct Line token that can be used to access a single conversation.
So the token you asked from anywhere else, cannot request the activities in webchat.
An work around
You can leverage BotFramework-WebChat to quickly build up a web site bot testing environment. And generate the token in your own server for the bot client authentication. Then you can use the generated token and conversationId for requesting all the activites between bot and this bot client web site outside of the box.

Facebook messenger, testing chatbot, incorrect sender.id (data.pageEntry.messaging.event.sender.id)

Clarifying my post:
I'm setting up a facebook chatbot using the sample code. This should allow me to send messages to the chatbot (via Messenger iOS app, or via chat window at Facebook.com, app page). The expected behavior would be
Send chat message
Echo chat message
Display correct logging, no errors
However, when I send a chat message, while it correctly echoes the chat message, I am finding an error in my logging. It produces the following error message:
{ message: '(#100) No matching user found',
type: 'OAuthException',
code: 100,
fbtrace_id: 'D+PAc3ZfmLS' }
After investigation, it appears as though the app is identifying the incorrect userID for my account (app owner). It has the correct receiver ID (page ID of the application). I cannot figure out why this occurs. A copy of typical logging information is below. The incorrect sender ID is listed as "1053426944750274".
Received message for user 1053426944750274 and page 289085874757891 at 2016-07-06T20:32:31+00:00 with message: {"mid":"mid.1467837151667:954f158fd950334f60", "seq":212, "text":"marco"}
Successfully sent generic message with id mid.1467837152021:729cf052bc826dc592 to recipient 1053426944750274
Received message for user 289085874757891 and page 1053426944750274 at 2016-07-06T20:32:32+00:00 with message: {"is_echo":true,"app_id":284007785268790, "mid":"mid.1467837152021:729cf052bc826dc592", "seq":213, "text":"marco"}
Are you sure you are using the sender.id in the message recipient.id?
be aware that Facebook id is different than what you need to use when you respond to users via messenger send API.
When representing a user, these IDs are page-scoped IDs (PSID). This means that the IDs of users are unique for a given page.
If you have an existing Facebook Login integration, user IDs are app-scoped and will not work with the Messenger platform.
source

Resources