Botium Connector for for SAP Conversational AI
This is a Botium connector for testing your SAP Conversational AI chatbot.
Did you read the Botium in a Nutshell articles? Be warned, without prior knowledge of Botium you won't be able to properly use this library!
How it works
Botium connects to your SAP Conversational AI chatbot using its Dialog endpoint.
It can be used as any other Botium connector with all Botium Stack components:
Features
- Text conversation
- Extracting media from Chatbot API response
- Extracting buttons from Chatbot API response (All rich message containing button are supported)
- Extracting NLP information (intent, entities) from API response
- Sending button clicks to Chatbot API
- Supporting conversation contexts
Requirements
- Node.js and NPM
- a SAP Conversational AI bot
- a project directory on your workstation to hold test cases and Botium configuration
Install Botium and SAP Conversational AI Connector
When using Botium CLI:
> npm install -g botium-cli
> npm install -g botium-connector-sapcai
> botium-cli init
> botium-cli run
When using Botium Bindings:
> npm install -g botium-bindings
> npm install -g botium-connector-sapcai
> botium-bindings init mocha
> npm install && npm run mocha
When using Botium Box:
Already integrated into Botium Box, no setup required
Connecting SAP Conversational AI chatbot to Botium
Process is very simple, you need just a token for your Chatbot. To acquire it choose your chatbot, and go in the settings in the tokens section. Using request token is preferred.
You can read about SAP Conversational AI tokens here.
Create a botium.json with this URL in your project directory:
{
"botium": {
"Capabilities": {
"PROJECTNAME": "<whatever>",
"CONTAINERMODE": "sapcai",
"SAPCAI_TOKEN": "..."
}
}
}
To check the configuration, run the emulator (Botium CLI required) to bring up a chat interface in your terminal window:
> botium-cli emulator
Botium setup is ready, you can begin to write your BotiumScript files.
How to start sample
There is a small demo in samples with Botium Bindings.
If you dont have installed Botium Core global, intstall it local:
> cd ./samples/
> npm install botium-core
Install the packages, and run the test:
> cd ./samples/
> npm install botium-core && npm install && npm test
Supported Capabilities
Set the capability CONTAINERMODE to sapcai to activate this connector.
SAPCAI_TOKEN
To acquire it
- open [SAP Conversational AI Console Dashboard],(https://cai.tools.sap/)
- choose your chatbot,
- go in the settings in the tokens section.
Using request token is preferred.
You can read about tokens here.
SAPCAI_LANGUAGE
A valid language isocode like "en". If not provided a language detection will be performed. See SAP Conversational AI, /Dialog endpoint.
SAPCAI_MEMORY
Initial conversation memory, see help