Skip to main content
PUT
/
v1
/
datasets
/
{dataset_id}
/
files
Update dataset file
curl --request PUT \
  --url https://api.gbase.ai/v1/datasets/{dataset_id}/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "title": "<string>",
  "filename": "<string>",
  "file_status": "ready",
  "file_lang": "<string>",
  "file_size": 0,
  "token_count": 0,
  "characters_count": 0,
  "failed_reason": "<string>",
  "resources": "<unknown>",
  "source_type": "",
  "learn_type": 100,
  "lark_file": {
    "name": "<string>",
    "type": "<string>",
    "token": "<string>",
    "created_time": "<string>",
    "modified_time": "<string>",
    "url": "<string>",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "deleted_at": "2023-11-07T05:31:56Z",
    "parent_token": "<string>",
    "owner_id": "<string>"
  },
  "extension": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "deleted_at": "2023-11-07T05:31:56Z",
    "source_url": "<string>",
    "source_path": "<string>",
    "source_type": "<string>",
    "file_name": "<string>",
    "title": "<string>",
    "summary": "<string>",
    "description": "<string>",
    "metadata": "<unknown>"
  },
  "file_name": "",
  "summary": "",
  "source_url": "",
  "source_path": "",
  "description": "",
  "metadata": {}
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "file_type": "<string>",
  "tokens": 123,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "title": "<string>",
  "filename": "<string>",
  "file_status": "ready",
  "file_size": 0,
  "token_count": 0,
  "characters_count": 0,
  "failed_reason": "<string>",
  "index_ids": "<unknown>",
  "resources": "<unknown>",
  "content_hash": "<string>",
  "source_type": "<string>",
  "learn_type": 100,
  "dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "lark_file": {
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "type": "<string>",
    "token": "<string>",
    "created_time": "<string>",
    "modified_time": "<string>",
    "url": "<string>",
    "vector_file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "parent_token": "<string>",
    "owner_id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

dataset_id
string<uuid>
required

Body

application/json
id
string<uuid>
title
string | null
Maximum string length: 2048
filename
string | null

对于网页,存储URL;对于本地上传,存储文件名;对于Lark文档,存储file的name字段

Maximum string length: 2048
file_status
string
default:ready

CRAWLED: crawled
PROCESS: process
COMPLETE: complete
FAIL: fail
Exceeded: exceeded
DELETED: deleted
READY: ready

Maximum string length: 20
file_lang
string | null
Maximum string length: 50
file_size
integer
default:0
Required range: -2147483648 <= x <= 2147483647
token_count
integer
default:0
Required range: -2147483648 <= x <= 2147483647
characters_count
integer
default:0
Required range: -2147483648 <= x <= 2147483647
failed_reason
string | null
resources
any
source_type
string | null
default:""

文件来源类型

Maximum string length: 100
learn_type
integer
default:100
Required range: -2147483648 <= x <= 2147483647
lark_file
Lark File · object
extension
Extension · object

VectorFile扩展信息表

用于存储VectorFile的扩展信息,采用一对一关系设计。
使用数据库外键约束保证数据一致性。

file_name
string
default:""
summary
string
default:""
source_url
string
default:""
source_path
string
default:""
description
string
default:""
metadata
Metadata · object

Response

Successful Response

created_at
string<date-time>
required
updated_at
string<date-time>
required
file_type
string
required

UPLOAD: upload
CONVERT: convert
HTML: html
INTEGRATION: integration
HTML_PDF: html_pdf
SITEMAP: sitemap
GITBOOK: gitbook
FAQ: faq
FAQ_QUESTION: faq_question

Maximum string length: 20
tokens
integer
required
id
string<uuid>
title
string | null
Maximum string length: 2048
filename
string | null

对于网页,存储URL;对于本地上传,存储文件名;对于Lark文档,存储file的name字段

Maximum string length: 2048
file_status
string
default:ready

CRAWLED: crawled
PROCESS: process
COMPLETE: complete
FAIL: fail
Exceeded: exceeded
DELETED: deleted
READY: ready

Maximum string length: 20
file_size
integer
default:0
Required range: -2147483648 <= x <= 2147483647
token_count
integer
default:0
Required range: -2147483648 <= x <= 2147483647
characters_count
integer
default:0
Required range: -2147483648 <= x <= 2147483647
failed_reason
string | null
index_ids
any
resources
any
content_hash
string | null
Maximum string length: 255
source_type
string | null

文件来源类型

Maximum string length: 100
learn_type
integer
default:100
Required range: -2147483648 <= x <= 2147483647
dataset_id
string<uuid> | null
lark_file
LarkFileOut · object