Page 1 of 1

Custom Recognizers

Posted: Wed Aug 30, 2017 9:04 pm
by SangramMCP
enum PriorityTypes




[Synonyms("IV", "4")]
public static void CreateFloorRecognizer(OscovaBot oscovaBot)
var FloorRecognizer = oscovaBot.CreateRecognizer("floor-name");

Is this kind of recognizers possible, where it can accept synomns as well?

Re: Custom Recognizers

Posted: Thu Aug 31, 2017 10:43 am
by JeffersonStack
just use

CSharp Code

and ur done.

Re: Custom Recognizers

Posted: Thu Sep 14, 2017 9:25 pm
by SangramMCP

How to compare a dynamic value to the existing entity?
For eg:

I will fetch value from Environment variable, and compare the same with entity. If the entity and the value in the environment variable matches, the context should change. Otherwise it should prompt that the entity is not valid.

Is it possible?

Re: Custom Recognizers

Posted: Fri Sep 15, 2017 2:31 am
by Sreejith
sorry i don't understand ur and where are u comparing entity and environment variable?

also I dont understand what u mean that the entity is invalid? if the user does not enter the desired text then why not use there any reason u are not using conditional contexts as mentioned in the developer network?

Re: Custom Recognizers

Posted: Fri Sep 15, 2017 4:40 pm
by SangramMCP

We have a requirement like this:

1. The bot is hosted in a Intranet environment.
2. The user is authenticated with his windows credentials.
3. The chat bot is used to raise tickets.
4. The user has 2 options: Either he can raise a ticket on his behalf or on behalf of someone else.
5. The chat bot will check the credentials used, and ask if he wants to ask ticket for himself, or for someone else.
6. If he wants for some behalf, the bot will ask for the other person credentials, and then the ticket will be raised.

I need to achieve this.


OscovaBot Evaluate issue

Posted: Fri Sep 15, 2017 8:55 pm
by veeramani.ramu

Am getting "Object reference not set to an instance of an object", when passing "******* applied ****" string in OscovaBot.Evaluate(inputmessage). Below are the StackTrace result.

at Syn.Bot.Oscova.Collections.TokenCollection.Contains(String value)
at Syn.Bot.Oscova.Internal.ScoreEngine.GetIntentResult(Request request, EntityCollection entityCollection, ExpressionInfo expressionInfo)
at Syn.Bot.Oscova.OscovaBot.Evaluate(Request request)
at Syn.Bot.Oscova.OscovaBot.Evaluate(String message)
at IconnectOscavaBot.Chat.MyMethod(String inputmessage, String id, String gid) in
*******************\Chat.aspx.cs:line 313

Can you please help to solve this issue.

Re: Custom Recognizers

Posted: Sat Sep 16, 2017 12:29 am
by Sreejith
to Sangram,

that is a classic example for soa bot this case u can host ur bot as a web api service and pass the credential and chat message thru url...if ur not familiar with web api service creation you can go ahead and use the WebApiChannel in Syn.Bot.Channels framework...but remember that unlike syn bot framework...the syn bot channels framework is in beta and is updated regularly with breaking changes.

to veeramani,

I tested ur code here in my console program and it is working with the ******* applied **** string and is not giving any errors...also can u tell me why ur using asterisk character in the request?

since this is a topic opened by Sangram...can u create a new topic in general discussion by clickin the new topic button and make a post with more details so I can help you without mixing my posts with Sangram's posts