This feature will allow you to take advantage of EDDI's automatic management of bots, it is possible to avoid creating conversations and managing them manually, but let them be managed by EDDI.
This will act as a shortcut to start directly a conversation with a bot that covers a specific intent.
But first you will have to set up a BotTrigger
.
{"intent": "string","botDeployments": [{"environment": "restricted","botId": "string","initialContext": {"additionalProp1": {"type": "string","value": {}},"additionalProp2": {"type": "string","value": {}},"additionalProp3": {"type": "string","value": {}}}}]}
Element | Description |
intent | ( |
botDeployments | ( |
environment | ( |
botId | ( |
initialContext | (Array < |
HTTP Method | API Endpoint | Request Body | Response |
DELETE |
| N/A | N/A |
GET |
| N/A | Bot Triggers-model |
PUT |
| Bot Triggers-model | N/A |
POST |
| Bot Triggers-model | N/A |
To trigger a managed bot you will have to call the following API endpoints.
HTTP Method | API Endpoint | Request Body | Response |
GET |
| N/A | Conversation model |
POST |
| Input model | N/A |
POST |
| Input model | N/A |
Element | Description |
{intent} | ( |
{userId} | ( |
Request URL:
POST
http://localhost:7070//bottriggerstore/bottriggers
Request Body
{"intent": "weather_trigger","botDeployments": [{"environment": "unrestricted","botId": "5bf5418c46e0fb000b7636d0","initialContext": {}}]}
Response Body
no content
Response Code
200
Response Headers
access-control-allow-headers: authorization, Content-Typeaccess-control-allow-methods: GET, PUT, POST, DELETE, PATCH, OPTIONSaccess-control-allow-origin: *access-control-expose-headers: locationconnection: Keep-Alivecontent-length: 0date: Mon, 18 Mar 2019 00:31:07 GMTkeep-alive: timeout=5, max=100server: Apache/2.4.29 (Ubuntu)
Request URL:
POST
http://localhost:7070/managedbots/weather_trigger/myUserId
Request Body
{"input": "Hello managed bot!","context": {}}
Response Body
{"botId": "5bf5418c46e0fb000b7636d0","botVersion": 10,"userId": "myUserId","environment": "unrestricted","conversationState": "READY","redoCacheSize": 0,"conversationOutputs": [{"input": "Hello managed bot!","expressions": "unknown(Hello), unknown(managed), unknown(bot!)","intents": ["unknown","unknown","unknown"]}],"conversationProperties": {},"conversationSteps": [{"conversationStep": [{"key": "input:initial","value": "Hello managed bot!"}],"timestamp": 1552869578596}]}
Response Code
200
Response Headers
access-control-allow-headers: authorization, Content-Typeaccess-control-allow-methods: GET, PUT, POST, DELETE, PATCH, OPTIONSaccess-control-allow-origin: *access-control-expose-headers: locationconnection: Keep-Alivecontent-length: 0date: Mon, 18 Mar 2019 00:31:07 GMTkeep-alive: timeout=5, max=100server: Apache/2.4.29 (Ubuntu)