-
Notifications
You must be signed in to change notification settings - Fork 115
[Samples] Add 11.qnamaker bot sample #1023
[Samples] Add 11.qnamaker bot sample #1023
Conversation
* Add deploymentTemplates folder * Fix templates
* Add qnabot class * Add pom * Add feedback changes * Remove join() calls
* Add Application class * Implement the use of ConfigurationCredentialProvider * Apply feedback
}; | ||
|
||
// The actual call to the QnA Maker service. | ||
qnaMaker.getAnswers(turnContext, options).thenAccept(response -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be:
// The actual call to the QnA Maker service.
return qnaMaker.getAnswers(turnContext, options)
.thenCompose(response -> {
if (response != null && response.length > 0) {
return turnContext.sendActivity(MessageFactory.text(response[0].getAnswer()))
.thenApply(sendResult -> null);
}
else {
return turnContext.sendActivity(MessageFactory.text("No QnA Maker answers were found."))
.thenApply(sendResult -> null);
}
});
@@ -0,0 +1,42 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new-rg-parameters.json can be removed.
@@ -0,0 +1,39 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preexisting-rg-parameters.json can be removed.
@@ -0,0 +1,183 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update template-with-new-rg.json with version from 02.echo-bot
@@ -0,0 +1,154 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update template-with-preexisting-rg.json with version from 02.echo-bot
@Batta32 Also need to update from main |
Thanks @tracyboehrer for your feedback. We will be applying the requested changes right now! |
@tracyboehrer - we already applied the requested changes and merged |
Fixes #864
Description
We are adding the sample 11.qnamaker in Java taking into account the C# 11.qnamaker bot present in BotBuilder-Samples repository.
Specific Changes
resources
folder with sample questions tsvdeploymentTemplates
folderapplication.properties
Testing
Current behavior of the Java migrated sample