- 后台接口
- 前台接口
- AI对话
- AI行业
- 问答拆分
- 上传接口
- 登录注册
- 其它配置
- 应用分享
- 充值套餐
- 用户管理
- 机器人管理
- 机器人发布
- 知识库提问
- 知识库数据
- 知识库管理
- 数字人
- 【新】后台接口
- 【新】前台接口
讯飞测试
POST
/api/KnowDialogue/emb
请求参数
Header 参数
token
string
可选
示例值:
{{api-token}}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/KnowDialogue/emb' \
--header 'token: {{api-token}}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
show
integer
必需
msg
string
必需
data
object
必需
lists
array [object {5}]
必需
count
integer
必需
page_no
integer
必需
page_size
integer
必需
extend
array[string]
必需
示例
{
"code": 1,
"show": 0,
"msg": "",
"data": {
"lists": [
{
"id": 1,
"type": 1,
"content": "法律"
},
{
"id": 1,
"type": 2,
"content": [
"我可不是法律专家,但我可以尽力提供一些基本的法律知识。请注意,这些信息仅供参考,不构成法律建议。如果您有具体的法律问题,请咨询专业的法律顾问或律师。"
],
"context": [],
"quotes": []
},
{
"id": 2,
"type": 1,
"content": "法律"
},
{
"id": 2,
"type": 2,
"content": [
"[]"
],
"context": [],
"quotes": []
},
{
"id": 3,
"type": 1,
"content": "法律"
},
{
"id": 3,
"type": 2,
"content": [
"[]"
],
"context": [],
"quotes": []
},
{
"id": 4,
"type": 1,
"content": "法律"
},
{
"id": 4,
"type": 2,
"content": [
"我不是很了解法律。"
],
"context": [
{
"role": "system",
"content": "下面是知识库内容:\n我可不是\n我可不是\n我不是很好"
},
{
"role": "system",
"content": "提示词哦"
},
{
"role": "system",
"content": "限定词哦"
},
{
"role": "user",
"content": "法律"
},
{
"role": "assistant",
"content": [
"我不是很了解法律。"
]
}
],
"quotes": []
},
{
"id": 5,
"type": 1,
"content": "法律"
},
{
"id": 5,
"type": 2,
"content": [
"我不是很了解法律。"
],
"context": [
{
"role": "system",
"content": "下面是知识库内容:\n我可不是\n我可不是\n我不是很好"
},
{
"role": "system",
"content": "提示词哦"
},
{
"role": "system",
"content": "限定词哦"
},
{
"role": "user",
"content": "法律"
},
{
"role": "assistant",
"content": [
"我不是很了解法律。"
]
}
],
"quotes": [
{
"q": "我可不是",
"a": "我可不是",
"distance": "-0.7771771742112961"
},
{
"q": "我可不是",
"a": "我可不是",
"distance": "-0.7770983937153417"
},
{
"q": "我不是很好",
"a": "我不是很好",
"distance": "-0.7655069300748423"
}
]
},
{
"id": 6,
"type": 1,
"content": "法律"
},
{
"id": 6,
"type": 2,
"content": [
"我不是很了解法律。"
],
"context": [
{
"role": "system",
"content": "下面是知识库内容:\n我可不是\n我可不是\n我不是很好"
},
{
"role": "system",
"content": "提示词哦"
},
{
"role": "system",
"content": "限定词哦"
},
{
"role": "user",
"content": "法律"
},
{
"role": "assistant",
"content": [
"我不是很了解法律。"
]
}
],
"quotes": [
{
"q": "我可不是",
"a": "我可不是",
"distance": "-0.7773036570718546"
},
{
"q": "我可不是",
"a": "我可不是",
"distance": "-0.7772243791434708"
},
{
"q": "我不是很好",
"a": "我不是很好",
"distance": "-0.7656748274823713"
}
]
}
],
"count": 0,
"page_no": 1,
"page_size": 25,
"extend": []
}
}
修改于 2023-09-21 02:17:09