curl --request POST \
--url https://open.bigmodel.cn/api/llm-application/open/document/upload_document/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form knowledge_type=123 \
--form 'custom_separator=[
"<string>"
]' \
--form sentence_size=123 \
--form parse_image=true \
--form 'callback_url=<string>' \
--form 'callback_header={}' \
--form 'word_num_limit=<string>' \
--form 'req_id=<string>' \
--form files=@example-file
{
"data": {
"successInfos": [
{
"documentId": "<string>",
"fileName": "<string>"
}
],
"failedInfos": [
{
"fileName": "<string>",
"failReason": "<string>"
}
]
},
"code": 123,
"message": "<string>",
"timestamp": 123
}
向指定知识库上传文件类型文档,支持多种切片方式和回调。
curl --request POST \
--url https://open.bigmodel.cn/api/llm-application/open/document/upload_document/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form knowledge_type=123 \
--form 'custom_separator=[
"<string>"
]' \
--form sentence_size=123 \
--form parse_image=true \
--form 'callback_url=<string>' \
--form 'callback_header={}' \
--form 'word_num_limit=<string>' \
--form 'req_id=<string>' \
--form files=@example-file
{
"data": {
"successInfos": [
{
"documentId": "<string>",
"fileName": "<string>"
}
],
"failedInfos": [
{
"fileName": "<string>",
"failReason": "<string>"
}
]
},
"code": 123,
"message": "<string>",
"timestamp": 123
}
使用以下格式进行身份验证:Bearer <your api key>
知识库id
业务处理成功
The response is of type object
.