Create a vector store file batch
Create a vector store file batch.
Request
POST
https://ai.api.cloud.yandex.net/v1/vector_stores/{vector_store_id}/file_batches
Path parameters
|
Name |
Description |
|
vector_store_id |
Type: string The ID of the vector store for which to create a File Batch. Example: `` |
Body
application/json
null
|
Name |
Description |
|
attributes |
Type: VectorStoreFileAttributes Default: Example
|
|
chunking_strategy |
Type: ChunkingStrategyRequestParam The chunking strategy used to chunk the file(s). If not set, will use the Example
|
|
file_ids |
Type: string[] A list of File IDs that the vector store should use. Useful for tools like Min items: Max items: Example
|
|
files |
Type: CreateVectorStoreFileRequest[] A list of objects that each include a Min items: Max items: Example
|
Any of 2 types
-
Type: unknown
Example:
null -
Type: unknown
Example:
null
AutoChunkingStrategyRequestParam
The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400.
|
Name |
Description |
|
type |
Type: string Always Const: Example: |
Example
{
"type": "auto"
}
StaticChunkingStrategy
|
Name |
Description |
|
chunk_overlap_tokens |
Type: integer The number of tokens that overlap between chunks. The default value is Note that the overlap must not exceed half of |
|
max_chunk_size_tokens |
Type: integer The maximum number of tokens in each chunk. The default value is Min value: Max value: |
Example
{
"max_chunk_size_tokens": 100,
"chunk_overlap_tokens": 0
}
StaticChunkingStrategyRequestParam
Customize your own chunking strategy by setting chunk size and chunk overlap.
|
Name |
Description |
|
static |
Type: StaticChunkingStrategy Example
|
|
type |
Type: string Always Const: Example: |
Example
{
"type": "static",
"static": {
"max_chunk_size_tokens": 100,
"chunk_overlap_tokens": 0
}
}
ChunkingStrategyRequestParam
The chunking strategy used to chunk the file(s). If not set, will use the auto strategy.
Type: object
One of 2 types
-
Auto Chunking Strategy
Type: AutoChunkingStrategyRequestParam
The default strategy. This strategy currently uses a
max_chunk_size_tokensof800andchunk_overlap_tokensof400.Example
{ "type": "auto" } -
Static Chunking Strategy
Type: StaticChunkingStrategyRequestParam
Customize your own chunking strategy by setting chunk size and chunk overlap.
Example
{ "type": "static", "static": { "max_chunk_size_tokens": 100, "chunk_overlap_tokens": 0 } }
Example
{
"type": "auto"
}
VectorStoreFileAttributes
Any of 2 types
-
Type: object
[additional]
One of 3 types
-
Type: string
Max length:
512Example:
example -
Type: number
-
Type: boolean
Example:
exampleSet of key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Max properties:
16Example
{} -
-
Type: unknown
Example:
null
Default: null
CreateVectorStoreFileRequest
|
Name |
Description |
|
file_id |
Type: string A File ID that the vector store should use. Example: |
|
attributes |
Type: VectorStoreFileAttributes Default: Example
|
|
chunking_strategy |
Type: ChunkingStrategyRequestParam The chunking strategy used to chunk the file(s). If not set, will use the Example
|
Example
{
"file_id": "example",
"chunking_strategy": {
"type": "auto"
},
"attributes": null
}
Responses
200 OK
OK
Body
application/json
{
"id": "example",
"object": "vector_store.files_batch",
"created_at": 0,
"vector_store_id": "example",
"status": "in_progress",
"file_counts": {
"in_progress": 0,
"completed": 0,
"failed": 0,
"cancelled": 0,
"total": 0
}
}
|
Name |
Description |
||||||||||
|
created_at |
Type: integer The Unix timestamp (in seconds) for when the vector store files batch was created. |
||||||||||
|
file_counts |
Type: object
Example
|
||||||||||
|
id |
Type: string The identifier, which can be referenced in API endpoints. Example: |
||||||||||
|
object |
Type: string The object type, which is always Const: Example: |
||||||||||
|
status |
Type: string The status of the vector store files batch, which can be either Enum: |
||||||||||
|
vector_store_id |
Type: string The ID of the vector store that the File is attached to. Example: |