Initiates a conversation with a chatbot by using the unique chatbot identifier (chatbot ID).
Operation description
The single-user queries per second (QPS) limit for this operation is 100. Exceeding this limit will trigger throttling, which may affect your business. Call this operation appropriately.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SessionId |
string |
No |
The session ID, which identifies the session and context information of a visitor. |
en |
| Utterance |
string |
Yes |
The input from the chatbot visitor. |
659216218162179 |
| IsvCode |
string |
No |
The ISV verification code, which is used to verify whether a RAM user is authorized by the ISV. |
ksiekdki39ksks93939 |
| ChatBotInstanceId |
string |
Yes |
The chatbot instance ID. |
1 |
| KnowledgeId |
string |
No |
The ID of the knowledge title in the knowledge base. |
1 |
| IntentName |
string |
No |
The intent name in the dialog flow. If you specify this name, the chatbot directly enters this intent for Q&A. |
intent |
| SenderId |
string |
No |
The visitor ID, which identifies the user in the current session. |
861500000000 |
| SenderNick |
string |
No |
The nickname of the visitor in the current session. |
nick |
| Perspective |
array |
No |
The list of perspective codes. |
|
|
string |
No |
The perspective code, which is used to retrieve answers from different perspectives under the same knowledge title. |
u6Yvizzjba |
|
| VendorParam |
object |
No |
The custom parameter set. This is a JSON-formatted set of user-defined parameters that can be passed to various dialog engines. |
{\"skills\":\"chat_search\",\"accessToken\":\"73f4d5c8e8c334d9b538890bca68ac9a\",\"senderStaffId\":\"1697204021326\",\"senderCorpId\":\"dingee291fb2828058b9\"} |
| CustSpaceId |
string |
No |
The SpaceId of the ISV sub-customer. |
293483938849493 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
90E63D28-E31D-1EB2-8939-A94866411B2O |
| Code |
string |
The return result. OK indicates normal. |
OK |
| Message |
string |
The message returned when an exception occurs. |
none |
| Data |
object |
The returned data. |
|
| MessageId |
string |
The ID of the response message in this session. |
ab6be8af-cee4-40c3-9919-2ac7461d7d98 |
| SessionId |
string |
The ID of this session. |
1234 |
| Messages |
array<object> |
The list of messages. |
|
|
array<object> |
The message body. |
||
| Knowledge |
object |
When AnswerType is Knowledge, this field contains the Knowledge object returned by the robot. |
|
| HitStatement |
string |
Hit statement. |
公积金 |
| Summary |
string |
Introduction to hit problems. |
公积金提取 |
| RelatedKnowledges |
array<object> |
Related knowledge list. |
|
|
object |
|||
| KnowledgeId |
string |
The ID of knowledge associated with knowledge. |
735899 |
| Title |
string |
The title of related knowledge. |
公积金提取 |
| Category |
string |
Knowledge category. |
公积金 |
| Title |
string |
Hit the title of the problem. |
公积金提取 |
| Content |
string |
Hit the content of the problem. |
公积金提取,请在首页搜索公积金提取,提交办事的表单 |
| AnswerSource |
string |
Distinguish answer types. |
KnowledgeBase |
| Id |
string |
The ID of the hit problem in the knowledge base. |
735898 |
| ContentType |
string |
Indication of plain/rich text answers. |
PLAIN_TEXT |
| Text |
object |
When AnswerType is Text, this field contains the Text object returned by the robot. |
|
| HitStatement |
string |
Hit statement. |
查天气 |
| DialogName |
string |
When AnswerSource is BotFramework, this field returns the name of the dialogue unit. |
示例_查天气 |
| AnswerSource |
string |
Distinguish answer types. |
BotFramework |
| Slots |
array<object> |
Slot information list. |
|
|
object |
Slot information. |
||
| Value |
string |
Specific values. |
北京 |
| Origin |
string |
Original value. |
北京 |
| Name |
string |
Name. |
查天气意图.city |
| Hit |
boolean |
Whether it hits. |
false |
| NodeName |
string |
When AnswerSource is BotFramework, this field returns the node name. |
示例_查天气.查天气填槽.__city |
| IntentName |
string |
When AnswerSource is BotFramework, this field returns the intent name. |
查天气意图 |
| MetaData |
string |
Metadata. |
[[{\"columnName\":\"姓名\",\"stringValue\":\"王珊珊\"}]] |
| ExternalFlags |
object |
When AnswerSource is BotFramework, this field returns a transparent parameter. |
|
| Ext |
object |
This field returns transparent parameters. |
|
| UserDefinedChatTitle |
string |
Custom Chat Topic Title. |
问候 |
| Content |
string |
The content of the text message. |
请问您要查哪里的天气? |
| NodeId |
string |
When AnswerSource is BotFramework, this field returns the node ID. |
1410-c7a72a78.__city |
| ContentType |
string |
Indication of plain/rich text answers. |
PLAIN_TEXT |
| Recommends |
array<object> |
When AnswerType is Recommended, this field contains a list of Recommendations returned by the robot. |
|
|
object |
Recommended object. |
||
| KnowledgeId |
string |
Clarify the knowledge ID. |
4548 |
| Title |
string |
Clarify the content, which may be the entities of graph Q&A, the knowledge titles of knowledge Q&A, or the column values of table Q&A. |
测试纯文本 |
| AnswerSource |
string |
Clarify the identification of the source. |
KNOWLEDGE |
| AnswerType |
string |
The type of this message. |
Text |
| AnswerSource |
string |
When AnswerType is Recommended, this field indicates the source of the recommended answer. |
KNOWLEDGE |
| AccessDeniedDetail |
string |
The access denied details. |
None. |
Examples
Success response
JSON format
{
"RequestId": "90E63D28-E31D-1EB2-8939-A94866411B2O",
"Code": "OK",
"Message": "none",
"Data": {
"MessageId": "ab6be8af-cee4-40c3-9919-2ac7461d7d98",
"SessionId": "1234",
"Messages": [
{
"Knowledge": {
"HitStatement": "公积金",
"Summary": "公积金提取",
"RelatedKnowledges": [
{
"KnowledgeId": "735899",
"Title": "公积金提取"
}
],
"Category": "公积金",
"Title": "公积金提取",
"Content": "公积金提取,请在首页搜索公积金提取,提交办事的表单",
"AnswerSource": "KnowledgeBase",
"Id": "735898",
"ContentType": "PLAIN_TEXT"
},
"Text": {
"HitStatement": "查天气",
"DialogName": "示例_查天气",
"AnswerSource": "BotFramework",
"Slots": [
{
"Value": "北京",
"Origin": "北京",
"Name": "查天气意图.city",
"Hit": false
}
],
"NodeName": "示例_查天气.查天气填槽.__city",
"IntentName": "查天气意图",
"MetaData": "[[{\\\"columnName\\\":\\\"姓名\\\",\\\"stringValue\\\":\\\"王珊珊\\\"}]]",
"ExternalFlags": {
"test": "test",
"test2": 1
},
"Ext": {
"test": "test",
"test2": 1
},
"UserDefinedChatTitle": "问候",
"Content": "请问您要查哪里的天气?",
"NodeId": "1410-c7a72a78.__city",
"ContentType": "PLAIN_TEXT"
},
"Recommends": [
{
"KnowledgeId": "4548",
"Title": "测试纯文本",
"AnswerSource": "KNOWLEDGE"
}
],
"AnswerType": "Text",
"AnswerSource": "KNOWLEDGE"
}
]
},
"AccessDeniedDetail": "无"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Product.Unsubscript | You have not subscribed to the specified product. | You have not subscribed to the specified product. |
| 400 | Ram.PermissionDeny | You are not authorized to perform the operation. | |
| 400 | System.LimitControl | The system is under flow control. | The system is under flow control. |
| 400 | Unknown.ResourceOwnerId | The resource does not belong to the current user. | The resource does not belong to the current user. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.