AI Agent API
# Large-model bot
# API Declaration
The "token" param must be contained in the header of the https request when calling the API.
Token is the only global API call credential for the Sobot API open platform. It is used when developers call the business APIs and thus should be properly kept. At least 32 chars should be reserved to store token. The validity period of token is currently 24 hours. It needs to be refreshed regularly or reacquired according to the token failure prompt returned by the API. When requesting the token API, regardless of the existence of token, a new token will be returned and its expiry time will be reset (currently 24 hours).
Token usage description:
- Developers need to obtain and manage the token uniformly. When calling the Sobot open APIs of various business, they should use the same token, instead of refreshing and obtaining new tokens for each business. Otherwise, it will easily lead to token invalidation and affect the normal API call.
- The current validity period of the token is transmitted by the returned expire_in, which is currently a value within 86,400 s. Developers need to refresh the new token in advance based on this valid time.
- Developers should reacquire the token according to the token invalidation prompt returned by the API.
# API Call
# ● Get the Access Token Code
API description:
Get the open API token, which is only applicable to all APIs of Sobot Open Platform v5.0. Contact the Sobot after-sales service personnel to get appid and app_key in the API.
Request method:
GET
Request URL:
https://sg.sobot.io/api/get_token
Request param:
Param | Type | Required | Description |
---|---|---|---|
appid | String | Yes | API credential ID, the unique API call credential ID for the 3rd-party users |
create_time | String | Yes | Timestamp (s), e.g.: timestamp 1569397773 for 2019-09-25 15:49:33 |
sign | String | Yes | Signature, md5(appid + create_time + app_key) sign signature, app_key is private key |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
item | Object | No | Return object |
item object:
Param | Type | Required | Description |
---|---|---|---|
token | String | Yes | token code |
expires_in | String | Yes | Credential valid time |
Timestamp conversion tool:
https://www.unixtimestamp.com/
sign signature generation example:
E.g., appid = "1"; create_time="1569397773"; app_key="2"
sign = Md5("115693977732") is 258eec3118705112b2c53dc8043d4d34.
Request example:
curl https://sg.sobot.io/api/get_token?appid=1&create_time=1569397773&sign=258eec3118705112b2c53dc8043d4d34
Return example:
{
"item": {
"token": "4ac37cb2e9c740dba4b75a34d5358802",
"expires_in": "86400"
},
"ret_code": "000000",
"ret_msg": "success"
}
2
3
4
5
6
7
8
# ● Q&A - Streaming
API description:
API type: Active call API
API function: The answer can be obtained and a session can be established by calling this interface.
Request method:
POST
Request URL:
http://sg.sobot.io/ai-agent-open/ask/answer
Request param
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | OpenRobotAnswerReqVo | Yes |
OpenRobotAnswerReqVo
Name | Type | Required | Description |
---|---|---|---|
question | string | yes | Question |
show_question | string | yes | Display question |
input_type_enum | string | yes | Input type |
biz_id | string | yes | Business id |
biz_type | string | yes | Business line type |
biz_type_id | string | yes | Product id |
robotid | string | yes | Bot id |
uid | string | false | Visitor id |
user_name | string | false | Visitor name |
transfer | boolean | false | Whether to enable trans-to-agent |
ai_agent_cid | string | false | AiAgent chat id |
call_back_url | string | false | Callback URL |
source_enum | string | yes | Channel source |
partnerid | string | false | Docking id |
params | Map<String,Object> | false | Custom param |
multi_params | Map<String,Object> | false | Custom param |
timing | boolean | false | Whether to enable external timing |
input_variable_infos | OpenAnswerVariableInfo | false | Externally passed variable |
process_info | OpenProcessInfo | false | Enum variable click information |
{
"question": "Customer service",
"show_question": "Customer service",
"input_type_enum": "INPUT",
"biz_id": "29967d81d67f4a708e8bd7d8f6356447",
"biz_type": "TEXT",
"biz_type_id": "1000016",
"robotid": "1",
"uid": "c56844605e72633776a6de28d0f598f3",
"user_name": "userName",
"transfer": true,
"ai_agent_cid": "12dec883b46d48a5808ea143379b7014",
"call_back_url": "http://sg.sobot.io/aiAgent/callback",
"source_enum": "PC",
"partnerid": "123456",
"params": {
"key": {}
},
"multi_params": {
"key": {}
},
"timing": false,
"input_variable_infos": [
{
"variable_id": "1888794111663644672",
"variable_name": "variableName",
"variable_value": "variableValue",
"variable_type": "CHARACTER"
}
],
"process_info": {
"process_id": "5a227ca7b4fc48e98d4e02b113c81c123",
"node_id": "1905555364410802345",
"variable_id": "1888794111663644672",
"variable_value": "variableValue"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Return example
Succeeded
Return result
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
data | Object | No | Return object |
Return data data structure
Type | Required | Constraint | Description |
---|---|---|---|
RobotAnswerRespVo | yes | none | none |
RobotAnswerRespVo
Name | Type | Required | Description |
---|---|---|---|
robot_answer_type | string | yes | Answer type |
robot_answer_message_type | string | yes | Message type |
answer | string | false | Answer |
transfer_result | string | false | Trans-to-agent result |
roundid | string | yes | Message round id |
msgid | string | yes | Message id |
ai_agent_cid | string | yes | AiAgent chat id |
biz_id | string | yes | Business id |
robot_name | string | yes | Bot name |
robot_logo | string | yes | Bot logo |
robotid | string | yes | Bot id |
robot_status | string | yes | Bot status |
delay | integer | yes | Node delay |
output_variable_infos | AnswerVariableInfo | false | Return collection variable |
process_id | string | false | Workflow id |
node_id | string | false | Node id |
variable_id | string | false | Variable id |
variable_value_enums | array | false | Enum list |
{
"data": [
{
"robot_answer_type": "QA_DIRECT",
"robot_answer_message_type": "MESSAGE",
"answer": "Customer service",
"transfer_result": "NO_ACTION",
"roundid": "12ef2d1957434f2eb4b45c629d2db2dc",
"msgid": "12789cf50b784e4480a02289ddc69fb9",
"ai_agent_cid": "12dec883b46d48a5808ea143379b7014",
"biz_id": "29967d81d67f4a708e8bd7d8f6356447",
"robot_name": "Ai-Agent",
"robot_logo": "",
"robotid": "1",
"robot_status": "DELETE",
"delay": 0,
"output_variable_infos": [
{
"variable_id": "1888794111663644672",
"variable_name": "variable_name",
"variable_value": "variable_value",
"variable_type": "CHARACTER"
}
],
"process_id": "5a227ca7b4fc48e98d4e02b113c81c123",
"node_id": "1905555364410802345",
"variable_id": "1888794111663644672",
"variable_value_enums": [
""
]
}
],
"retCode": "000000",
"retMsg": "success"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# ● Q&A - Visitor side initialization
API description:
API type: Active call API
API function: Call this interface to initialize the visitor information and generate the visitor.
Request method:
GET
Request URL:
http://sg.sobot.io/ai-agent-open/ask/ask_init
Request param
Name | Location | Type | Required |
---|---|---|---|
robotid | query | string | Yes |
bizid | query | string | Yes |
Return example
Succeeded
{
"data": {
"bizid": "a97e877ad6b9403bbf945401ea331111",
"ai_agent_cid": "17ad7f4ab65b4aedadb3b72caf6a86cd",
"biz_type": "AI_AGENT",
"biz_typeid": "1000045"
},
"retCode": "000000",
"retMsg": "success"
}
2
3
4
5
6
7
8
9
10
Return result
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
data | Object | No | Return object |
Return data structure
InitRespVo
Type | Required | Constraint | Description |
---|---|---|---|
InitRespVo | yes | none | none |
Attribute
Name | Type | Required | Description |
---|---|---|---|
bizId | string¦null | false | Business id |
aiAgentCid | string¦null | false | Current chat id |
bizType | string¦null | false | Business line type |
bizTypeId | string¦null | false | Product id |
{
"bizId": "a97e877ad6b9403bbf945401ea331111",
"aiAgentCid": "17ad7f4ab65b4aedadb3b72caf6a86cd",
"bizType": "AI_AGENT",
"bizTypeId": "1000045"
}
2
3
4
5
6
7
# ● Q&A - Non-streaming
API description:
API type: Active call API
API function: The answer can be obtained and a session can be established by calling this interface.
Request method:
POST
Request URL:
http://sg.sobot.io/ai-agent-open/ask/answer_no_stream
Body request param
Request param
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | OpenRobotAnswerReqVo | Yes | none |
OpenRobotAnswerReqVo
Name | Type | Required | Description |
---|---|---|---|
question | string | yes | Question |
show_question | string | yes | Display question |
input_type_enum | string | yes | Input type |
biz_id | string | yes | Business id |
biz_type | string | yes | Business line type |
biz_type_id | string | yes | Product id |
robotid | string | yes | Bot id |
uid | string | false | Visitor id |
user_name | string | false | Visitor name |
transfer | boolean | false | Whether to enable trans-to-agent |
ai_agent_cid | string | false | AiAgent chat id |
call_back_url | string | false | Callback URL |
source_enum | string | yes | Channel source |
partnerid | string | false | Docking id |
params | Map<String,Object> | false | Custom param |
multi_params | Map<String,Object> | false | Custom param |
timing | boolean | false | Whether to enable external timing |
input_variable_infos | OpenAnswerVariableInfo | false | Externally passed variable |
process_info | OpenProcessInfo | false | Enum variable click information |
{
"question": "Customer service",
"show_question": "Customer service",
"input_type_enum": "INPUT",
"biz_id": "a97e877ad6b9403bbf945401ea331111",
"biz_type": "TEXT",
"biz_type_id": "1000016",
"robotid": "1",
"uid": "c56844605e72633776a6de28d0f598f3",
"user_name": "userName",
"transfer": true,
"ai_agent_cid": "17ad7f4ab65b4aedadb3b72caf6a86cd",
"call_back_url": "http://www.sobot.com/aiAgent/callback",
"source_enum": "PC",
"partnerid": "123456",
"params": {
"key": {}
},
"multi_params": {
"key": {}
},
"timing": false,
"input_variable_infos": [
{
"variable_id": "1888794111663644672",
"variable_name": "variableName",
"variable_value": "variableValue",
"variable_type": "CHARACTER"
}
],
"process_info": {
"process_id": "5a227ca7b4fc48e98d4e02b113c81c123",
"node_id": "1905555364410802345",
"variable_id": "1888794111663644672",
"variable_value": "variableValue"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Return example
Succeeded
Return result
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
data | Object | No | Return object |
Return data data structure
Type | Required | Constraint | Description |
---|---|---|---|
RobotAnswerRespVo | yes | none | none |
{
"data": [
{
"robot_answer_type": "QA_DIRECT",
"robot_answer_message_type": "MESSAGE",
"answer": "Customer service",
"transfer_result": "NO_ACTION",
"roundid": "12ef2d1957434f2eb4b45c629d2db2dc",
"msgid": "12789cf50b784e4480a02289ddc69fb9",
"ai_agent_cid": "12dec883b46d48a5808ea143379b7014",
"biz_id": "29967d81d67f4a708e8bd7d8f6356447",
"robot_name": "Ai-Agent",
"robot_logo": "",
"robotid": "1",
"robot_status": "DELETE",
"delay": 0,
"output_variable_infos": [
{
"variable_id": "1888794111663644672",
"variable_name": "variableName",
"variable_value": "variableValue",
"variable_type": "CHARACTER"
}
],
"process_id": "5a227ca7b4fc48e98d4e02b113c81c123",
"node_id": "1905555364410802345",
"variable_id": "1888794111663644672",
"variable_value_enums": [
""
]
}
],
"retCode": "000000",
"retMsg": "success"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# ● Q&A - Word association
API description:
API type: Active call API
API function: Customers can obtain the questions in the knowledge base in advance through this interface.
Request method:
POST
Request URL:
http://sg.sobot.io/ai-agent-open/ask/answer_suggest
Body request param
Request param
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | RobotAnswerReqVo | Yes | none |
RobotAnswerReqVo
Name | Type | Required | Description |
---|---|---|---|
question | string | yes | Question |
show_question | string | yes | Display question |
input_type_enum | string | yes | Input type |
biz_id | string | yes | Business id |
biz_type | string | yes | Business line type |
biz_type_id | string | yes | Product id |
robotid | string | yes | Bot id |
uid | string | false | Visitor id |
user_name | string | false | Visitor name |
transfer | boolean | false | Whether to enable trans-to-agent |
ai_agent_cid | string | false | AiAgent chat id |
call_back_url | string | false | Callback URL |
source_enum | string | yes | Channel source |
partnerid | string | false | Docking id |
params | Map<String,Object> | false | Custom param |
multi_params | Map<String,Object> | false | Custom param |
timing | boolean | false | Whether to enable external timing |
input_variable_infos | OpenAnswerVariableInfo | false | Externally passed variable |
process_info | OpenProcessInfo | false | Enum variable click information |
{
"question": "Customer service",
"show_question": "Customer service",
"input_type_enum": "INPUT",
"biz_id": "29967d81d67f4a708e8bd7d8f6356447",
"biz_type": "TEXT",
"biz_type_id": "1000016",
"robotid": "1",
"uid": "c56844605e72633776a6de28d0f598f3",
"user_name": "userName",
"transfer": true,
"ai_agent_cid": "12dec883b46d48a5808ea143379b7014",
"call_back_url": "http://www.sobot.com/aiAgent/callback",
"source_enum": "PC",
"partnerid": "123456",
"params": {
"key": {}
},
"multi_params": {
"key": {}
},
"timing": false,
"input_variable_infos": [
{
"variable_id": "1888794111663644672",
"variable_name": "variableName",
"variable_value": "variableValue",
"variable_type": "CHARACTER"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Return example
Succeeded
Return result
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
data | Object | No | Return object |
Return data data structure
Type | Required | Constraint | Description |
---|---|---|---|
RobotAnswerSuggestRespVo | yes | none | none |
{
"data": {
"qa_contents": [
{
"question": "Customer service",
"questionid": "dda6a07ef5b74642a601102095d1681a",
"docid": "e3e8a0a11f27496a8448ced8a7ba392d",
"score": 0
}
]
},
"retCode": "000000",
"retMsg": "success"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
# ● Q&A - Asynchronous
API description:
API type: Active call API
API function: The robot's answer can be returned asynchronously by calling this interface.
Request method:
POST
Request URL:
http://sg.sobot.io/ai-agent-open/ask/answer_with_call_back
Body request param
Request param
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | RobotAnswerReqVo | Yes | none |
{
"question": "Customer service",
"show_question": "Customer service",
"input_type_enum": "INPUT",
"biz_id": "29967d81d67f4a708e8bd7d8f6356447",
"biz_type": "TEXT",
"biz_type_id": "1000016",
"robotid": "1",
"uid": "c56844605e72633776a6de28d0f598f3",
"user_name": "userName",
"transfer": true,
"ai_agent_cid": "12dec883b46d48a5808ea143379b7014",
"call_back_url": "http://www.sobot.com/aiAgent/callback",
"source_enum": "PC",
"partnerid": "123456",
"params": {
"key": {}
},
"multi_params": {
"key": {}
},
"timing": "false",
"input_variable_infos": [
{
"variable_id": "1888794111663644672",
"variable_name": "variableName",
"variable_value": "variableValue",
"variable_type": "CHARACTER"
}
],
"process_info": {
"process_id": "5a227ca7b4fc48e98d4e02b113c81c123",
"node_id": "1905555364410802345",
"variable_id": "1888794111663644672",
"variable_value": "variableValue"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Return example
Succeeded
{
"data": {},
"retCode": "000000",
"retMsg": "success",
"pageNo": 0,
"pageCount": 0,
"totalCount": 0,
"pageSize": 0
}
2
3
4
5
6
7
8
9
Return result
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
data | Object | No | Return object |
# ● Chat end
API description:
API type: Active call API
API function: The session of the robot can be ended by calling this interface.
Request method:
GET
Request URL:
http://sg.sobot.io/ai-agent-open/ask/end_session
Request param
Name | Location | Type | Required | Description |
---|---|---|---|---|
ai_agent_cid | query | string | Yes | none |
Return example
Succeeded
{
"data": {},
"ret_code": "000000",
"ret_msg": "success"
}
2
3
4
5
Return result
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
data | Object | No | Return object |
# ● Polling timeout message
API description:
API type: Active call API
API function: The timeout message can be polled by calling this interface.
Request method:
GET
Request URL:
http://sg.sobot.io/ai-agent-open/ask/get_push_info
Request param
Name | Location | Type | Required | Description |
---|---|---|---|---|
msgid | query | string | Yes | none |
Return example
Succeeded
{
"data": {
"msgid": "12789cf50b784e4480a02289ddc69fb9",
"data": {
"msgid": "12789cf50b784e4480a02289ddc69fb9",
"bizid": "a97e877ad6b9403bbf945401ea331111",
"ai_agent_cid": "12dec883b46d48a5808ea143379b7014",
"round_id": "12ef2d1957434f2eb4b45c629d2db2dc",
"msg": "Customer service",
"source_enum": "PC",
"uid": "c56844605e72633776a6de28d0f598f3",
"polling_id": "4cd268c9836d45eb931af9c70cf6cc1d",
"polling_status": "POLLING_END"
},
"bizid": "a97e877ad6b9403bbf945401ea331111",
"push_type": "ROBOT_ANSWER"
},
"retCode": "000000",
"retMsg": "success"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Return result
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
data | Object | No | Return object |
Return data data structure
Type | Required | Constraint | Description |
---|---|---|---|
PushInfo<PushData> | yes | none | none |
# ● Streaming API parsing method
- Determine that the robotAnswerMessageType field ERROR_END indicates an abnormal end to the chat, and MESSAGE indicates message parsing; extract the answer field directly, with msgId corresponding to the message id and the information below. ANSWER_INFO and PROCESS_INFO are for answer information parsing; both answer and the other fields need to be parsed, and if answer has no value, no parsing is needed.
- Determine the robotAnswerType field; in the cases of ANSWER_INFO and PROCESS, this field is currently used for displaying the trans-to-agent button, and it may have other purposes in the future.
- Determine the transferResult field; in the cases of ANSWER_INFO and PROCESS, this field is used to determine whether trans-to-agent is needed.
- Determine the delay field; in the cases of ANSWER_INFO and PROCESS, if this field is greater than 0, polling node timeout will be initiated
# ● Button message interaction in task workflow
- The variable in the workflow is set as an enum type
- The bot Q&A API output param RobotAnswerRespVo will return enum related data (process_id, node_id, variable_id, variable_value_enums)
- After selecting a value from the enum, the bot Q&A API input param RobotAnswerReqVo needs to add enum data process_info (process_id corresponds to process_id in step 2, node_id corresponds to node_id in step 2, variable_id corresponds to variable_id in step 2, variable_value corresponds to a certain value in variable_value_enums in step 2), and input_type_enum is set to PROCESS_CLICK
# ● Data model
PushInfo
{
"msgid": "12789cf50b784e4480a02289ddc69fb9",
"data": {},
"bizid": "a97e877ad6b9403bbf945401ea331111",
"push_type": "SESSION_OVER_TIME"
}
2
3
4
5
6
7
Attribute
Name | Type | Required | Description |
---|---|---|---|
msg_id | string | yes | Message id |
data | Object | yes | Message |
bizid | string | yes | Business id |
push_type | string | yes | Message type |
PushData format
{
"msgid": "12789cf50b784e4480a02289ddc69fb9",
"bizid": "a97e877ad6b9403bbf945401ea331111",
"ai_agent_cid": "12dec883b46d48a5808ea143379b7014",
"round_id": "12ef2d1957434f2eb4b45c629d2db2dc",
"msg": "Customer service",
"source_enum": "PC",
"uid": "c56844605e72633776a6de28d0f598f3",
"polling_id": "4cd268c9836d45eb931af9c70cf6cc1d",
"polling_status": "POLLING_END"
}
2
3
4
5
6
7
8
9
10
11
Attribute
Name | Type | Required | Description |
---|---|---|---|
msgid | string | yes | Message id |
bizid | string | yes | Business id |
ai_agent_cid | string | yes | Large-model bot chat id |
round_id | string | yes | Round id |
msg | string | false | Message |
source_enum | string | yes | Source |
uid | string | false | Visitor id |
polling_id | string | yes | Polling id |
polling_status | string | yes | Polling status |
Enum value
Attribute | Value | Description |
---|---|---|
push_type | SESSION_OVER_TIME | Chat timeout, data format |
push_type | NODE_OVER_TIME | Node timeout, data format |
push_type | ROBOT_ANSWER | Push answer, data data is List<RobotAnswerRespVo> |
polling_status | POLLING_START | Start |
polling_status | POLLING_RUNNING | Ongoing |
polling_status | POLLING_END | End |
RobotAnswerReqVo
{
"question": "Customer service",
"show_question": "Customer service",
"input_type_enum": "INPUT",
"biz_id": "29967d81d67f4a708e8bd7d8f6356447",
"biz_type": "TEXT",
"biz_type_id": "1000016",
"robotid": "1",
"uid": "c56844605e72633776a6de28d0f598f3",
"user_name": "userName",
"transfer": true,
"ai_agent_cid": "12dec883b46d48a5808ea143379b7014",
"call_back_url": "http://www.sobot.com/aiAgent/callback",
"source_enum": "PC",
"partnerid": "123456",
"params": {
"key": {}
},
"multi_params": {
"key": {}
},
"timing": false,
"input_variable_infos": [
{
"variable_id": "1888794111663644672",
"variable_name": "variableName",
"variable_value": "variableValue",
"variable_type": "CHARACTER"
}
],
"process_info": {
"process_id": "5a227ca7b4fc48e98d4e02b113c81c123",
"node_id": "1905555364410802345",
"variable_id": "1888794111663644672",
"variable_value": "variableValue"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Attribute
Name | Type | Required | Description |
---|---|---|---|
question | string | yes | Question |
show_question | string | yes | Display question |
input_type_enum | string | yes | Input type |
biz_id | string | yes | Business id |
biz_type | string | yes | Business line type |
biz_type_id | string | yes | Product id |
robotid | string | yes | Bot id |
uid | string | false | Visitor id |
user_name | string | false | Visitor name |
transfer | boolean | false | Whether to enable trans-to-agent |
ai_agent_cid | string | false | AiAgent chat id |
call_back_url | string | false | Callback URL |
source_enum | string | yes | Channel source |
partnerid | string | false | Docking id |
params | Map<String,Object> | false | Custom param |
multi_params | Map<String,Object> | false | Custom param |
timing | boolean | false | Whether to enable external timing |
input_variable_infos | OpenAnswerVariableInfo | false | Externally passed variable |
process_info | OpenProcessInfo | false | Enum variable click information |
Enum value
Attribute | Value | Description |
---|---|---|
input_type_enum | INPUT | Normal input |
input_type_enum | CLICK | Click input |
input_type_enum | PROCESS_CLICK | Task process click input |
input_type_enum | WELCOME | Get welcome message |
biz_type | AI_AGENT | Large-model bot itself |
source_enum | PC | Desktop |
source_enum | ||
source_enum | APP | sdk |
source_enum | ||
source_enum | wap | h5 |
source_enum | huJiao | Call |
source_enum | workOrder | Ticket |
source_enum | uCenter | CRM |
source_enum | qiYeWeixin | WeCom |
source_enum | miniApp | Mini Program |
source_enum | baiDu | Baidu |
source_enum | touTiao | Taobao |
source_enum | qihu360 | Qihoo 360 |
source_enum | wolongShenMa | |
source_enum | sougou | SoGou |
source_enum | wxkf | WeChat Agent |
source_enum | guangDianTong | |
source_enum | zhihu | |
source_enum | fb | |
source_enum | ||
source_enum | ||
source_enum | line | |
source_enum | discord | |
source_enum | telegram | |
source_enum | shopify | |
source_enum |
AnswerVariableInfo
{
"variable_id": "1888794111663644672",
"variable_name": "variableName",
"variable_value": "variableValue",
"variable_code": "string",
"variable_type": "CHARACTER"
}
2
3
4
5
6
7
Attribute
Name | Type | Required | Description |
---|---|---|---|
variable_id | string | yes | Variable id |
variable_name | string | yes | Variable name |
variable_value | string | yes | Variable value |
variable_code | string | yes | Variable code |
variable_type | string | yes | Variable type (1: Char, 2: Number, 3: Enum) |
Enum value
Attribute | Value | Description |
---|---|---|
variable_type | CHARACTER | Chars |
variable_type | NUMBER | Number |
variable_type | ENUMERATION | Enum |
OpenProcessInfo
{
"process_id": "5a227ca7b4fc48e98d4e02b113c81c123",
"node_id": "1905555364410802345",
"variable_id": "1888794111663644672",
"variable_value": "variableValue"
}
2
3
4
5
6
7
Attribute
Name | Type | Required | Description |
---|---|---|---|
variable_id | string | yes | Variable id |
process_id | string | yes | Workflow id |
variable_value | string | yes | Variable value |
node_id | string | yes | Node id |
QaInfo
{
"question": "Customer service",
"questionid": "dda6a07ef5b74642a601102095d1681a",
"docid": "e3e8a0a11f27496a8448ced8a7ba392d",
"score": 0
}
2
3
4
5
6
7
Attribute
Name | Type | Required | Description |
---|---|---|---|
question | string | yes | Standardized question |
questionId | string | yes | Standardized question id |
docId | string | yes | Entry id |
score | number | yes | Matching threshold |
RobotAnswerSuggestRespVo
{
"qa_contents": [
{
"question": "Customer service",
"questionid": "string",
"docid": "e3e8a0a11f27496a8448ced8a7ba392d",
"score": 0
}
]
}
2
3
4
5
6
7
8
9
10
11
Attribute
Name | Type | Required | Description |
---|---|---|---|
qaContents | QaInfo | yes | Word association list |
RobotAnswerRespVo
{
"robot_answer_type": "QA_DIRECT",
"robot_answer_message_type": "MESSAGE",
"answer": "Customer service",
"transfer_result": "NO_ACTION",
"roundid": "12ef2d1957434f2eb4b45c629d2db2dc",
"msgid": "12789cf50b784e4480a02289ddc69fb9",
"ai_agent_cid": "12dec883b46d48a5808ea143379b7014",
"biz_id": "29967d81d67f4a708e8bd7d8f6356447",
"robot_name": "Ai-Agent",
"robot_logo": "string",
"robotid": "1",
"robot_status": "DELETE",
"delay": 0,
"output_variable_infos": [
{
"variable_id": "1888794111663644672",
"variable_name": "variableName",
"variable_value": "variableValue",
"variable_code": "string",
"variable_type": "CHARACTER"
}
],
"process_id": "5a227ca7b4fc48e98d4e02b113c81c123",
"node_id": "1905555364410802345",
"variable_id": "1888794111663644672",
"variable_value_enums": [
"string"
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Attribute
Name | Type | Required | Description |
---|---|---|---|
robot_answer_type | string | yes | Answer type |
robot_answer_message_type | string | yes | Message type |
answer | string | false | Answer |
transfer_result | string | false | Trans-to-agent result |
roundid | string | yes | Message round id |
msgid | string | yes | Message id |
ai_agent_cid | string | yes | AiAgent chat id |
biz_id | string | yes | Business id |
robot_name | string | yes | Bot name |
robot_logo | string | yes | Bot logo |
robotid | string | yes | Bot id |
robot_status | string | yes | Bot status |
delay | integer | yes | Node delay |
output_variable_infos | AnswerVariableInfo | false | Return collection variable |
process_id | string | false | Workflow id |
node_id | string | false | Node id |
variable_id | string | false | Variable id |
variable_value_enums | array | false | Enum list |
Enum value
Attribute | Value | Description |
---|---|---|
robot_answer_type | QA_DIRECT | Direct answer |
robot_answer_type | DOCUMENT_DIRECT | Document direct answer |
robot_answer_type | PROCESS | Process start |
robot_answer_type | PROCESS_DOING | Process ongoing |
robot_answer_type | PROCESS_DOING_UNKOW | Task process is ongoing, hit unknown answer |
robot_answer_type | PROCESS_DOING_LLM | Task process is ongoing, prompt generated by the large model |
robot_answer_type | PROCESS_DOING_QA_GENERAL | Task process is ongoing, hit general knowledge |
robot_answer_type | PROCESS_DOING_CLEAR | Task process is ongoing, process clarification |
robot_answer_type | PROCESS_DOING_SLOT_CLEAR | Task process is ongoing, slot value clarification |
robot_answer_type | PROCESS_DOING_QA_DIRECT | Task process is ongoing, hit QA direct answer |
robot_answer_type | PROCESS_DOING_DOCUMENT_DIRECT | Task process is ongoing, hit document direct answer |
robot_answer_type | PROCESS_ERROR | Task process_exception |
robot_answer_type | PROCESS_END | Task process end |
robot_answer_type | PROCESS_VALUE_ERROR | Variable enum value not obtained |
robot_answer_type | TRANSFER_INTENTION | Trans-to-agent intent |
robot_answer_type | UNKNOWN | Unknown answer |
robot_answer_type | GENERAL | General knowledge answer |
robot_answer_message_type | MESSAGE | Message parsing |
robot_answer_message_type | ANSWER_INFO | Answer parsing |
robot_answer_message_type | ERROR | Parsing error |
robot_answer_message_type | ERROR_END | Chat has been terminated |
robot_answer_message_type | PROCESS_INFO | Process parsing |
transfer_result | NO_ACTION | Not trans-to-agent |
transfer_result | KEY_WORD | Trans-to-agent by keywords |
transfer_result | GPT_TRANSFER | Intent trans-to-agent |
transfer_result | REPEAT | Repetitive question trans-to-agent |
transfer_result | NEGATIVE_EMOTIONS | Trans-to-agent by neg. emotions |
transfer_result | MUCH_UNKNOWN | Multiple unknowns trans-to-agent |
transfer_result | PROCESS_NODE_TRANSFER | Process node trans-to-agent |
robot_status | DELETE | Large-model bot has been deleted |
robot_status | ENABLE | Large-model bot is functioning normally |
robot_status | EXPIRE | Large-model bot has expired and is disabled |
robot_status | EXHAUST | The Q&As of the large-model bot has been used up |
Enum value
Attribute | Value | Description |
---|---|---|
bizType | AI_AGENT | Large-model bot |