MiniMax
  1. Retrieval(知识库检索)
MiniMax
  • 公告通知
  • 产品定价
  • 概述
  • FAQ
  • 大模型介绍
    • 文本大模型
    • 语音大模型
  • 接入说明
    • 新手指南
    • 速率说明
  • 开发指南
    • 快速开始
  • 文本大模型接口
    • ChatCompletion Pro(对话)
      • 概述
      • ChatCompletion Pro API 文档
        • ChatCompletion Pro API
        • 示例对话功能
        • 限制返回格式功能(glyph)
        • 函数调用功能(function calling)
        • 插件功能(plugins)
        • 知识库检索功能(retrieval)
    • ChatCompletion(对话)
      • 概述
      • ChatCompletion 快速接入
      • ChatCompletion 调优指南
      • ChatCompletion API 文档
        • ChatCompletion API
        • 知识库检索功能(retrieval)
  • Assistants 接口
    • Assistants 操作指南
    • Assistans API 文档
      • Assistant
        • 创建 Assistant
        • 检索 Assistants
        • 删除 assistant
        • 查看 assistant 列表
      • Assistant File
        • 创建 assistant 文件
        • 检索 assistant 关联的文件
        • 列出 assistant 文件
      • Thread
        • 创建 thread
        • 检索 thread
      • Message
        • 创建 message
        • 检索 message
        • message 列表
      • Run
        • 创建 run
        • 检索 run
        • 列表 run
        • Submit tool outputs to run
      • Run Step
        • 检索 run step
        • 列表 run step
  • File(文档)
    • File(文档)
      GET
    • Upload 接口
      GET
    • Retrieve 接口
      GET
    • Delete 接口
      POST
    • RetrieveContent 接口
      GET
  • Retrieval(知识库检索)
    • 新建知识库
      POST
    • 删除知识库
      POST
    • 查看知识库详情
      GET
    • 查看知识库列表
      GET
    • 增加知识库文档
      POST
    • 删除知识库文档
      POST
    • 修改知识库文档
      POST
    • 查看知识库文档
      GET
    • 检索 Chatcompletion
      POST
    • 检索 Chatcompletion pro
      POST
  • 微调
    • Finetune 操作指南
    • Finetune API文档
      • 创建微调任务
      • 列出微调任务
      • 检索微调任务
      • 删除微调任务
      • 列出微调事件
      • 列举微调模型
      • 查询微调模型
      • 删除微调模型
  • 向量化
    • Embeddings(向量化)
  • 语音大模型接口
    • T2A (语音生成)
      • T2A 快速接入
      • T2A API 接口
        • T2A API接口
        • 字典功能(Dictionary)
    • T2A pro(长文本语音生成)
      • T2A Pro 快速接入
      • T2A Pro API 接口
      • 字典功能(Dictionary)
    • T2A large(异步超长文本语音生成)
      • T2A Large 快速接入
      • T2A Large API 接口
        • T2A Large API 接口
        • 字典功能(Dictionary)
    • T2A Stream(流式语音生成)
      • T2A Stream(流式语音生成)
      • 字典功能(Dictionary)
    • 快速复刻(Voice Cloning)
      • 上传文件
      • 音频复刻
  • 有声内容创作
    • Role Classification (文本角色分类)
      • 创建并异步运行角色识别任务
      • 查询角色识别任务
    • Role Audio Generation (角色音频生成)
      • 角色音频生成
  1. Retrieval(知识库检索)

修改知识库文档

开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/v1/embedding/update_document
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'http://dev-cn.your-api-server.com/v1/embedding/update_document?GroupId=${group_id}' \
--header 'Authorization: Bearer ${api_key}' \
--header 'content-type: application/json' \
--data-raw '{
    "operator_id": 45033223333,
    "knowledge_base_id": ${knowledge_base_id},
    "file_id": ${file_id},
    "doc_params": {
        "chunk_size": 500,
        "chunk_overlap": 50,
        "separators": ["/n"],
        "is_regex": true
    }
}'
响应示例响应示例
{
    "file_id": 0,
    "knowledge_base_id": ${knowledge_base_id},
    "knowledge_base": {
        "knowledge_base_id": ${knowledge_base_id},
        "name": "test3",
        "description": "",
        "embedding_model": "kbq-001",
        "create_time": 1700742086395,
        "insert_time": 1700796361445,
        "delete_time": 1700796932183,
        "docs": [],
        "status": "loading"
    },
    "usage": null,
    "base_resp": {
        "status_code": 0,
        "status_msg": "success"
    }
}

请求参数

Query 参数
GroupId
string 
必需
示例值:
${group_id}
Header 参数
content-type
string 
必需
示例值:
application/json
Authorization
string 
必需
示例值:
Bearer ${api_key}
Body 参数application/json
operator_id
integer 
操作流水ID,同一操作流水ID幂等
必需
用同一个流水ID调用会使用第一次的调用参数
knowledge_base_id
object 
知识库ID
必需
file_id
object 
知识库已有的file_id
必需
doc_params
object 
增加文档参数
可选
chunk_size
integer 
必需
chunk_overlap
integer 
必需
separators
array[string]
必需
is_regex
boolean 
必需
示例

返回响应

🟢200成功
application/json
Body
file_id
integer 
文件ID
必需
knowledge_base_id
object 
知识库ID
必需
knowledge_base
object 
知识库信息
必需
knowledge_base_id
object 
知识库ID
必需
name
string 
知识库名称
必需
description
string 
知识库描述
必需
embedding_model
string 
知识库模型
必需
create_time
integer 
必需
知识库创建时间,毫秒
insert_time
integer 
必需
最近一次插入文档时间,毫秒
delete_time
integer 
必需
最近一次删除文档时间,毫秒
docs
array[string]
知识库所使用的文档
必需
status
string 
必需
loading-操作进行中 available-无操作进行中
usage
null 
必需
知识库计费为异步,需通过账单查看用量
base_resp
object 
必需
status_code
integer 
必需
2032-知识库个数达到上限 2033-知识库文档字符数达到上限 2034-当前知识库上一个操作未完成,同一个知识库的删除知识库、增加文档、删除文档、修改文档需串行执行 2036-知识库操作正在处理中
status_msg
string 
必需
上一页
删除知识库文档
下一页
查看知识库文档
Built with