使用 DescribeKnowledgeBase 接口查询指定知识库的完整配置。
前提条件
已创建 AgentStorage 实例且状态为
normal,并获取实例访问地址(endpoint)和实例名。已创建 API Key。
请求参数
参数 | 类型 | 说明 |
| string | 知识库名称(必填) |
请求示例
使用 API Key 认证时,通过 x-ots-instancename 和 x-ots-apikey 请求头传入实例名和 API Key。
curl -X POST https://<endpoint>/DescribeKnowledgeBase \
-H "x-ots-instancename: <instance-name>" \
-H "x-ots-apikey: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"knowledgeBaseName": "product_docs_kb"}'响应
字段 | 类型 | 说明 |
| string | 知识库名称 |
| string | 知识库描述 |
| list<string> | 标签列表 |
| boolean | 是否开启子空间 |
| int | 创建时间戳(毫秒) |
| int | 更新时间戳(毫秒) |
| list<object> | 元数据字段定义 |
| object | Embedding 配置 |
| object | 检索配置 |
{
"code": "SUCCESS",
"data": {
"knowledgeBaseName": "product_docs_kb",
"description": "产品文档知识库",
"tags": [
"产品",
"文档"
],
"subspace": true,
"multimodal": false,
"metadata": [
{
"name": "author",
"type": "string"
},
{
"name": "date",
"type": "date"
},
{
"name": "score",
"type": "double"
}
],
"createdAt": 1789633023582,
"updatedAt": 1789633023582,
"embeddingConfiguration": {
"provider": "bailian",
"model": "text-embedding-v4",
"dimension": 1024,
"url": null,
"apiKey": null
},
"ingestConfiguration": {
"enableTableFormulaCaption": false
},
"retrievalConfiguration": {
"searchType": [
"DENSE_VECTOR",
"FULL_TEXT"
],
"denseVectorSearchConfiguration": {
"numberOfResults": 10
},
"fullTextSearchConfiguration": {
"numberOfResults": 10
},
"rerankingConfiguration": {
"type": "RRF",
"numberOfResults": 5,
"modelConfiguration": {
"provider": "bailian",
"model": "gte-rerank-v2"
},
"rrfConfiguration": {
"denseVectorSearchWeight": 0.6,
"fullTextSearchWeight": 0.4,
"k": 60
},
"weightConfiguration": {
"denseVectorSearchWeight": 0.7,
"fullTextSearchWeight": 0.3
}
}
}
},
"message": "succeed"
}该文章对您有帮助吗?