Closed liiver closed 7 years ago
My BOT is working in group conversation but its giving error messages too because of extra information sent by channel
For collection I understood Value1. "id 28 1a2a2391 5a3d 49ff a9a6 66be40d11a8b BOTName" is not an option.
Please suggest how to fix it?
Similar to this. because of @botid
in the text of the incoming activity your Luis models are getting confused. Either train your Luis models to ignore the bot id or remove the bot mention from the text before posting to your Luis model.
potentially fixed by #1398 ?
In a group conversation the pattern is usually that the bot needs to be "mentioned" in some way. We leave the original text entact, but send entity annotation information which describes the part of the text which is the mention so you can deal with it (for example remove it) before sending to a system like LUIS.
Look at
https://docs.botframework.com/en-us/csharp/builder/sdkreference/activities.html
In the section "Mention Entities"
Mention Entities
Many communication clients have mechanisms to "mention" someone. Knowing that someone is mentioned can be an important piece of information for a bot that the channel knows and needs to be able to pass to you.
Frequently a bot needs to know that they were mentioned, but with some channels they don't always know what their name is on that channel. (again see Slack and Group me where names are assigned per conversation)
To accommodate these needs the Entities property includes Mention objects, accessible through the GetMentions() method.
The Mention object
Property
Description
type
type of the entity ("mention")
mentioned
ChannelAccount of the person or user who was mentioned
text
the text in the Activity.Text property which represents the mention. (this can be empty or null)
Example: The user on slack says:
@ColorBot pick me a new color
{
...
"entities": [{
"type":"mention",
"mentioned": {
"id": "UV341235", "name":"Color Bot"
},
"text": "@ColorBot"
}]
...
}
This allows the bot to know that they were mentioned and to ignore the part of the input when trying to determine the user intent.
NOTE: Mentions go both ways. A bot may want to mention a user in a reply to a conversation. If they fill out the Mentions object with the mention information then it allows the Channel to map it to the mentioning semantics of the channel.
Sure, you can have entities, but don't send them in text as well.
There is a serious bug with LUIS and Skype groupchats. When I interact with bout 1:1, it is ok and querys into Luis come in as expected, but whenever I use groupchat, for some reason the incoming query has also some BotID in it and it messes up totally the queryes and LUIS itself. I am using C# with botbuilder 3.2.0
Sample log output from luis logs. Queries from Skype groupchat: