https://github.com/codeforequity-at/botium-connector-azure-cqa
https://github.com/codeforequity-at/botium-connector-azure-cqa
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/codeforequity-at/botium-connector-azure-cqa
- Owner: codeforequity-at
- License: mit
- Created: 2023-02-23T14:02:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-05T08:09:10.000Z (almost 3 years ago)
- Last Synced: 2025-02-03T06:35:25.399Z (over 1 year ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Botium Connector for Azure Custom Question Answering
[](https://nodei.co/npm/botium-connector-azure-cqa/)
[](https://app.codeship.com/projects/462873)
[](https://badge.fury.io/js/botium-connector-azure-cqa)
[]()
This is a [Botium](https://github.com/codeforequity-at/botium-core) connector for testing your Azure Custom Question Answering intent resolution logic.
__Did you read the [Botium in a Nutshell](https://medium.com/@floriantreml/botium-in-a-nutshell-part-1-overview-f8d0ceaf8fb4) articles? Be warned, without prior knowledge of Botium you won't be able to properly use this library!__
## How it works
It can be used as any other Botium connector with all Botium Stack components:
* [Botium CLI](https://github.com/codeforequity-at/botium-cli/)
* [Botium Bindings](https://github.com/codeforequity-at/botium-bindings/)
* [Botium Box](https://www.botium.at)
## Prerequisites
* __Node.js and NPM__
* [AZURE subsription](https://azure.microsoft.com/free/cognitive-services)
* Azure CQA project
* [Resource key, and endpoint of the Azure CQA project](https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/conversational-language-understanding/quickstart#get-your-resource-keys-and-endpoint)
* The name of the Azure CQA project
* The deployment name
* A __project directory__ on your workstation to hold test cases and Botium configuration
See also [Create, test, and deploy a custom question answering project](https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/question-answering/how-to/create-test-deploy)
## Install Botium and Azure Custom Question Answering Connector
When using __Botium CLI__:
```
> npm install -g botium-cli
> npm install -g botium-connector-azure-cqa
> botium-cli init
> botium-cli run
```
When using __Botium Bindings__:
```
> npm install -g botium-bindings
> npm install -g botium-connector-azure-cqa
> botium-bindings init mocha
> npm install && npm run mocha
```
When using __Botium Box__:
_Already integrated into Botium Box, no setup required_
## Connecting Azure Custom Question Answering
Create a botium.json with Azure resource key, and endpoint:
```javascript
{
"botium": {
"Capabilities": {
"PROJECTNAME": "Botium Project Azure CQA",
"CONTAINERMODE": "azure-cqa",
"AZURE_CQA_ENDPOINT_URL": "xxx",
"AZURE_CQA_ENDPOINT_KEY": "xxx",
"AZURE_CQA_PROJECT_NAME": "xxx"
}
}
}
```
Botium setup is ready, you can begin to write your [BotiumScript](https://github.com/codeforequity-at/botium-core/wiki/Botium-Scripting) files.
## Supported Capabilities
Set the capability __CONTAINERMODE__ to __azure-cqa__ to activate this connector.
### AZURE_CQA_ENDPOINT_URL
See [Resource key, and endpoint of the Azure CQA project](https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/conversational-language-understanding/quickstart#get-your-resource-keys-and-endpoint)
### AZURE_CQA_ENDPOINT_KEY
See [Resource key, and endpoint of the Azure CQA project](https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/conversational-language-understanding/quickstart#get-your-resource-keys-and-endpoint)
### AZURE_CQA_PROJECT_NAME
The name of the Azure CQA project
### AZURE_CQA_USER_ID
The user ID.
_Default: random (uuid)_
### AZURE_CQA_DEPLOYMENT_NAME
The name of the specific deployment of the project to use.
_Default: 'production'_
### AZURE_CQA_API_VERSION
API version.
_Default: 2021-10-01_
### AZURE_CQA_RANKER_TYPE
Type of ranker to be used.
_Default: 'Default'_
Possible values:
* Default
* QuestionOnly
### AZURE_CQA_INCLUDE_UNSTRUCTURED_SOURCES
Flag to enable Query over Unstructured Sources.
_Default: true_
### AZURE_CQA_API_VERSION
Enable or disable Answer Span prediction. See also [Precise answering](https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/question-answering/concepts/precise-answering)
_Default: false_
See also [Question Answering - Get Answers](https://learn.microsoft.com/en-us/rest/api/cognitiveservices/questionanswering/question-answering/get-answers)