Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

[Samples] Add 11.qnamaker bot sample - #1023

Merged
tracyboehrer (tracyboehrer) merged 13 commits into
microsoft:mainfrom
southworks:feature/southworks/samples/11qnamaker
Feb 26, 2021
Merged

tracyboehrer (tracyboehrer) merged 13 commits into
microsoft:mainfrom
southworks:feature/southworks/samples/11qnamaker

Conversation

@Batta32

Copy link
Copy Markdown
Contributor

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

  • Generate main structure of the sample
  • Add resources folder with sample questions tsv
  • Add deploymentTemplates folder
  • Add root files
  • Add application.properties
  • Add LICENSE document
  • Add README document to describe the steps to run the sample

Testing

Current behavior of the Java migrated sample
image

MatR (matiasroldan6) and others added 11 commits February 19, 2021 13:57
* 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 -> {

Copy link
Copy Markdown
Member

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 @@
{

Copy link
Copy Markdown
Member

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 @@
{

Copy link
Copy Markdown
Member

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 @@
{

Copy link
Copy Markdown
Member

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 @@
{

Copy link
Copy Markdown
Member

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

@tracyboehrer

Copy link
Copy Markdown
Member

Martin Battaglino (@Batta32) Also need to update from main

@Batta32

Copy link
Copy Markdown
Contributor Author

Thanks tracyboehrer (@tracyboehrer) for your feedback. We will be applying the requested changes right now!

MatR (matiasroldan6) added a commit to southworks/botbuilder-java that referenced this pull request Feb 26, 2021
@Batta32

Copy link
Copy Markdown
Contributor Author

tracyboehrer (@tracyboehrer) - we already applied the requested changes and merged main into this branch 😊.

@tracyboehrer
tracyboehrer (tracyboehrer) merged commit f84e1da into microsoft:main Feb 26, 2021
@Batta32
Martin Battaglino (Batta32) deleted the feature/southworks/samples/11qnamaker branch March 1, 2021 12:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sample: 11.qnamaker

4 participants