Learn how to:
Chatbot solution integration
2. IBM Watson
4. Webhook
STT integration
1. How can I register a Deepbrain AI Chatbot?
Create a chatbot on Deepbrain AI Chat and connect it with your project.
1. Sign in or sign up to the website.
2. Select a chatbot from your chatbot list or create a new one by clicking 'New chatbot' button.
3. Click the settings icon in the upper left corner to see the chatbot ID.
4. Copy and paste botId into your AI Human project.
-----------------------------------------------------------------------------------------------------------------------------
2.How can I register an IBM Watson Chatbot?
Third-party chatbot
IBM Watson Assistant
1. Go to IBM Cloud resources list page.
2. Search for your Watson Assistant and click 'View full details'.
3. You can copy and paste your API key and service URL in this page.
4. Click 'Launch Watson Assistant' to get your Assistant ID.
5. Click 'Assistant Settings' on the left side menu.
6. Copy and paste your Assistant ID.
---------------------------------------------------------------------------------------------------------------------------
3.How can I register a Google Dialogflow Chatbot?
Google Dialogflow
1. Create a dialogflow chatbot and access the Google Cloud console.
2. Check the project you're working in and click the 'IAM & Admin' menu.
3. Go to 'Service Accounts' tab and click the 'Create Service Account' button.
4. Enter a unique service account id value and select the dialog flow API admin role.
5. To download a private key file, click 'Manage keys' > 'Add Key' > 'Create new key' and select key type as JSON.
6. Upload this JSON key file to your AI Human project.
4. Webhook
You can connect your own webhook server to handle chatbot scenarios.
Type
Type specifies the type of your request and response body.
Text type
Request
Hello.
Response
Hello.
JSON type
Request
{ text: 'hello' }
Response
{
"text": "hello.",
"languages": { "ko": "hello." },
"image": {
"url": "https://d2s5oxcf7msaxg.cloudfront.net/projects/default/logo.svg",
"displayname": "cities and locations.png"
},
"buttons": [],
"contentTitle": "Cities and Locations"
}
Connection Type
Connection Type specifies how your webhook server communicate with AI Human service. It can be either REST API
or Websocket
.
URL
URL specifies your webhook server URL.
Sample Server Code
Below is the sample webhook server code with request, response body type of Text
and connection type of Websocket
.
const app = require('express')()
const server = require('http').createServer(app)
const io = require('socket.io')(server)
const cors = require('cors')
const port = 3000
const result = {
"text": "hello.",
"languages": { "ko": "hello." },
"image": {
"url": "https://d2s5oxcf7msaxg.cloudfront.net/projects/default/logo.svg",
"displayname": "sample.png"
},
"buttons": [],
"contentTitle": "Cities and Locations"
};
const resultText = "hello."
app.use(cors())
app.post('/rest/text', function (req, res) {
res.send(resultText)
})
app.post('/rest/json', function (req, res) {
res.json(result)
})
io.on('connection', (socket) => {
socket.on("send", (json) => {
socket.emit("message", result)
})
});
server.listen(port, function () {
console.log('server listening on port ' + port)
})
----------------------------------------------------------------------------------------------------------------------------
STT integration
1.How can I register Microsoft Azure STT?
Microsoft Azure
To use Microsoft Azure STT for your AI Human project, you have to set your subscription key and region.
1. Go to Microsoft Azure and click 'Resource Group' or 'All Resources'.
2. Search for your Azure voice service and click it to see details.
3. Scroll down to get your subscription key (key 1 or key 2) and region. Endpoint is optional.