跳转到主要内容
POST
/
api
/
ai
/
knowledges
/
{id}
/
bulk
cURL
curl --request POST \
  --url https://api.example.com/api/ai/knowledges/{id}/bulk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "createdAt": "2018-11-21T06:20:32.232Z",
    "updatedAt": "2018-11-21T06:20:32.232Z",
    "disabled": true,
    "storageFileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "parserConfig": {
      "chunkSize": 1000,
      "chunkOverlap": 100,
      "delimiter": "; , ."
    },
    "pages": [
      {
        "createdAt": "2018-11-21T06:20:32.232Z",
        "updatedAt": "2018-11-21T06:20:32.232Z",
        "id": "<string>",
        "createdById": "<string>",
        "updatedById": "<string>",
        "pageContent": "<string>",
        "metadata": {},
        "status": "<string>"
      }
    ],
    "chunks": [
      {
        "createdAt": "2018-11-21T06:20:32.232Z",
        "updatedAt": "2018-11-21T06:20:32.232Z",
        "id": "<string>",
        "createdById": "<string>",
        "updatedById": "<string>",
        "pageContent": "<string>",
        "metadata": {},
        "status": "<string>",
        "parent": "<unknown>"
      }
    ],
    "id": "<string>",
    "createdById": "<string>",
    "updatedById": "<string>",
    "sourceConfig": {},
    "category": "text",
    "type": "<string>",
    "thumbnail": "<string>",
    "parserId": "<string>",
    "name": "<string>",
    "filePath": "<string>",
    "fileUrl": "<string>",
    "folder": "<string>",
    "size": 123,
    "mimeType": "<string>",
    "tokenNum": 123,
    "chunkNum": 123,
    "progress": 123,
    "processMsg": "<string>",
    "processBeginAt": "2023-11-07T05:31:56Z",
    "processDuation": 123,
    "status": "waiting",
    "jobId": "<string>",
    "options": {},
    "metadata": {},
    "draft": {},
    "parent": "<unknown>"
  }
]
'

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

路径参数

id
string
必填

请求体

application/json

Knowledge documents

createdAt
string<date-time>
必填
示例:

"2018-11-21T06:20:32.232Z"

updatedAt
string<date-time>
必填
示例:

"2018-11-21T06:20:32.232Z"

disabled
boolean
必填
storageFileId
string<uuid>
必填

Storage file ID

parserConfig
object
必填

Parser Config

示例:
{
"chunkSize": 1000,
"chunkOverlap": 100,
"delimiter": "; , ."
}
pages
object[]
必填
chunks
object[]
必填
id
string
createdById
string
updatedById
string
sourceConfig
object
category
enum<string>

Category of the document

可用选项:
text,
image,
audio,
video,
sheet,
other
type
string

Type of the file

thumbnail
string
parserId
string
name
string
filePath
string
fileUrl
string
folder
string
size
number
mimeType
string
tokenNum
number
chunkNum
number
progress
number
processMsg
string
processBeginAt
string<date-time>
processDuation
number
status
enum<string>

Status of the document process

可用选项:
waiting,
validate,
running,
transformed,
splitted,
understood,
embedding,
cancel,
finish,
error
jobId
string
options
object
metadata
object
draft
object
parent
any

Parent document

响应

201 - undefined