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

[SDK] Add bot-ai-qna library #907

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions etc/bot-checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@
<module name="TodoComment"/>
<module name="UpperEll"/>

<!-- check for usage of literal equality "==" between string -->
<module name="StringLiteralEquality"/>
</module>

</module>
14 changes: 14 additions & 0 deletions libraries/bot-ai-qna/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
35 changes: 33 additions & 2 deletions libraries/bot-ai-qna/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,46 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-builder</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-dialogs</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-builder</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-integration-spring</artifactId>
<version>4.6.0-preview8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.0</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<version>4.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.microsoft.bot.ai.qna;

/**
* Join Operator for Strict Filters.
*/
public enum JoinOperator {
/**
* Default Join Operator, AND.
*/
AND,

/**
* Join Operator, OR.
*/
OR
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.microsoft.bot.ai.qna;

import com.microsoft.bot.schema.Activity;

/**
* QnA dialog response options class.
*/
public class QnADialogResponseOptions {
private String activeLearningCardTitle;
private String cardNoMatchText;
private Activity noAnswer;
private Activity cardNoMatchResponse;

/**
* Gets the active learning card title.
*
* @return The active learning card title
*/
public String getActiveLearningCardTitle() {
return activeLearningCardTitle;
}

/**
* Sets the active learning card title.
*
* @param withActiveLearningCardTitle The active learning card title.
*/
public void setActiveLearningCardTitle(String withActiveLearningCardTitle) {
this.activeLearningCardTitle = withActiveLearningCardTitle;
}

/**
* Gets the card no match text.
*
* @return The card no match text.
*/
public String getCardNoMatchText() {
return cardNoMatchText;
}

/**
* Sets the card no match text.
*
* @param withCardNoMatchText The card no match text.
*/
public void setCardNoMatchText(String withCardNoMatchText) {
this.cardNoMatchText = withCardNoMatchText;
}

/**
* Gets the no answer activity.
*
* @return The no answer activity.
*/
public Activity getNoAnswer() {
return noAnswer;
}

/**
* Sets the no answer activity.
*
* @param withNoAnswer The no answer activity.
*/
public void setNoAnswer(Activity withNoAnswer) {
this.noAnswer = withNoAnswer;
}

/**
* Gets the card no match response.
*
* @return The card no match response.
*/
public Activity getCardNoMatchResponse() {
return cardNoMatchResponse;
}

/**
* Sets the card no match response.
*
* @param withCardNoMatchResponse The card no match response.
*/
public void setCardNoMatchResponse(Activity withCardNoMatchResponse) {
this.cardNoMatchResponse = withCardNoMatchResponse;
}
}
Loading