获取推荐问题
POST/v1/aibot/bots/:botId/recommend-questions
获取推荐问题
Request
Path Parameters
botId stringrequired
Agent ID
Example: bot-xxx
- application/json
Body
required
- Array [
- ]
name string
Agent 名称
introduction string
Agent 简介
agentSetting string
Agent 设定
msg string
用户消息内容
history object[]
历史对话信息
role stringrequired
历史信息角色
content stringrequired
历史信息内容
Responses
- 200
- default
获取推荐问题成功时返回, 返回格式为 SSE 格式
Response Headers
X-Request-Id string
请求ID
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
created number
对话时间戳
record_id string
对话记录ID
model string
大模型类型
version string
大模型版本
type string
回复类型: text: 主要回答内容,thinking: 思考过程,search: 查询结果,knowledge: 知识库
role string
对话角色,响应中固定为 assistant
content string
对话内容
finish_reasion string
对话结束标志,continue 表示对话未结束,stop 表示对话结束
reasoning_content string
深度思考内容(仅deepseek-r1是不为空字符串)
usage object
token使用量
prompt_tokens number
表示prompt的tokens数,多次返回中保持不变
completion_tokens number
回答的token总数,在流式返回中,表示到目前为止所有completion的tokens总数,多次返回中持续累加
total_tokens number
表示prompt_tokens和completion_tokens之和
knowledge_base string[]
对话中使用到的知识库
search_info object
搜索结果信息,需要开启联网查询
search_results undefined[]
搜索引文信息
index string
搜索引文序号
title string
搜索引文标题
url string
搜索引文链接
{
"created": "1726030224",
"record_id": "record-427d3652",
"model": "hunyuan",
"version": "202407241700",
"type": "assistant",
"role": "assistant",
"content": "你好",
"finish_reasion": "continue",
"reasoning_content": "",
"usage": {
"prompt_tokens": 10,
"completion_tokens": 20,
"total_tokens": 30
},
"knowledge_base": [
""
],
"search_info": {
"search_results": [
{
"index": "【1】",
"title": "标题",
"url": "链接"
}
]
}
}
获取推荐问题失败时返回
- application/json
- Schema
- Example (from schema)
Schema
code string
错误代码
message string
错误信息
requestId string
请求ID
{
"code": "INVALID_CREDENTIALS",
"message": "Credentials are invalid",
"requestId": "6360ba4b-f672-434b-9dee-35686a5589a4"
}
Loading...