对话接口
POST
/openapi/bot/message
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
botId
string
机器人id
sessionId
string
会话id
message
消息
Any of
history
array [object {2}]
可选
text
string
消息文本
isSelf
boolean
是否是机器人发送
stream
boolean
流式返回
示例
{
"botId": "5eCcf701-D91E-1C36-46b1-6F64e1D5eEf8",
"sessionId": "iNyO8",
"message": {
"type": "text",
"text": "Kyilg wugk wecypk kwgqw uloo ldbnvdgf hpnp njfqj nrjrncgdl ydfwyltr glvpn qqo ryixglwcae kugsjqdk xdve mozvoje lkqkn."
},
"history": [
{
"text": "但识金极光育六或代程新算经称相。",
"isSelf": false
},
{
"text": "单转无划十般关手毛理术风权。",
"isSelf": false
},
{
"text": "根华易定间九层易名县花影们。",
"isSelf": false
},
{
"text": "区明观给看接儿更温电然亲院一交。",
"isSelf": false
},
{
"text": "目门走族国低型音作县酸织手土格系。",
"isSelf": true
}
],
"stream": false
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://insight.juzibot.com/openapi/bot/message' \
--header 'Content-Type: application/json' \
--data-raw '{
"botId": "5eCcf701-D91E-1C36-46b1-6F64e1D5eEf8",
"sessionId": "iNyO8",
"message": {
"type": "text",
"text": "Kyilg wugk wecypk kwgqw uloo ldbnvdgf hpnp njfqj nrjrncgdl ydfwyltr glvpn qqo ryixglwcae kugsjqdk xdve mozvoje lkqkn."
},
"history": [
{
"text": "但识金极光育六或代程新算经称相。",
"isSelf": false
},
{
"text": "单转无划十般关手毛理术风权。",
"isSelf": false
},
{
"text": "根华易定间九层易名县花影们。",
"isSelf": false
},
{
"text": "区明观给看接儿更温电然亲院一交。",
"isSelf": false
},
{
"text": "目门走族国低型音作县酸织手土格系。",
"isSelf": true
}
],
"stream": false
}'
返回响应
🟢200成功
application/json
Body
code
integer
返回码
data
object
数据
message
string
消息
handover
boolean
转人工标识
domain
string
进入的分类
msgId
string
消息ID
references
array [object {3}]
引用数组
fileUrls
array[string]
回复文件链接
示例
{
"code": 0,
"data": {
"message": "string",
"handover": true,
"domain": "string",
"msgId": "string",
"references": [
{
"similarity": "string",
"content": "string",
"reference": {
"type": "string",
"source": {
"id": "string",
"question": "string",
"answer": "string",
"reviewed": "string",
"generated": "string",
"updatedBy": "string",
"createdBy": "string"
}
}
}
],
"fileUrls": [
"string"
]
}
}