bots


How to call a LUIS Dialog outside of the MessagesController class


I want to call a LUIS dialog from outside of MessagesController class. I create a root Dialog in my MessageController class:
if (activity.Type == ActivityTypes.Message) {
await Conversation.SendAsync(activity, () => new MessageDialogHandler());
In my MessageDialogHandler class I'm handling Attachments and Text input.
if (activity.Attachments?.Count() > 0) {
FaceAnalysis faceAnalysis = new FaceAnalysis();
await faceAnalysis.AnalyseImageAsync(context, argument);
}
else if(activity.Text.Length > 0) {
//here needs to be the code to call a LUIS dialog.
}
I have a standard LUIS class:
[LuisModel("App-ID", "SubscriptionKey")]
[Serializable]
public class LuisDialog : LuisDialog<object> {
How do I manage to call that LUIS Dialog from my MessageDialogHandler class?
Yes I did read this post Link but it didn't help me.
Thanks for any ideas.
You just need to do a context.Forward of the message to the LuisDialog.
await context.Forward(
new LuisDialog(),
LuisDialogCompleted,
activity,
System.Threading.CancellationToken.None);
To understand more around how to call dialogs, please refer to this.

Related Links

get recently posts on vbulltein and send to Telegram bot
How to get skype bot id using access token
How can I integrate my Bot (created with the Bot Framework) with Spark?
Microsoft Bot says “The process cannot access the file because it is being used by another process.”
When should we use all three (trait, free-text and keywords) search strategies in a user-defined entity?
alternative to wit.ai merge since it is deprecated now
my telegram bot keeps sending messages endlessly
Telegram: don't search my bot to start conversation
How to add MS bot to slack?
How to get the last executed command in a Telegram bot?
How can i customize answer of Bot Framework Help Command?
How can I identify the particular attachments when I click on a button in cards?
Accessing facebook user id for microsoft bot framework
Wit.ai Dynamic quick replies and random responses? How
I'm trying to implement a quote system in mIRC for my Twitch bot, reading from the text file works, but adding doesn't
How to set Slack bot presence “online” when using Events API

Categories

HOME
qt
entity-framework
xcode
freeradius
jms
bots
enums
tcsh
histogram
twitter-fabric
swift2
google-search-console
mailing-list
spring-security-oauth2
fasm
xades4j
phpstorm-2017.1
mailmerge
pm2
outlook-restapi
smartgwt
squirrel-sql
jpa-2.0
synthesis
multi-upload
mime-types
candlestick-chart
firemonkey-style
network-analysis
history.js
lxml
private-key
winrm
custom-keyboard
polyml
db2-luw
landscape
microsoft-ui-automation
aurelia-http-client
reset
praat
stat
game-center
classnotfoundexception
icepdf
fluid-mac-app-engine
sendinput
daz3d
adblock
wysihtml5
subforms
sequence-diagram
winmerge
google-news
http-basic-authentication
lvalue
hmmlearn
cognos-tm1
d3v4
okio
openquery
bilinear-interpolation
p6spy
static-methods
highlighting
mathnet
psd
flush
teensy
opencyc
html-escape-characters
comctl32
flurry-analytics
wicket-1.5
tabris
webautomation
distributed-r
network-printers
redpitaya
reference-counting
bittorrent-sync
xulrunner
django-sites
visual-c++-2005
saga
eclim
yii-booster
postgres-xc
ofstream
contextswitchdeadlock
playorm
stretch
dropshadow
affinetransform
representation
active-record-query
eaccelerator
eventaggregator
firephp
jquery-effects
acceleration
gui-designer

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App