mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 04:04:14 +00:00
Add Vector Store File batches api stubc
This commit is contained in:
parent
1e25a72ece
commit
de84c7bda7
4 changed files with 957 additions and 77 deletions
454
docs/static/llama-stack-spec.html
vendored
454
docs/static/llama-stack-spec.html
vendored
|
@ -4741,6 +4741,59 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel": {
|
||||
"post": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A VectorStoreFileBatchObject representing the cancelled file batch.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/VectorStoreFileBatchObject"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest400"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/TooManyRequests429"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalServerError500"
|
||||
},
|
||||
"default": {
|
||||
"$ref": "#/components/responses/DefaultError"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"VectorIO"
|
||||
],
|
||||
"summary": "Cancels a vector store file batch.",
|
||||
"description": "Cancels a vector store file batch.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "batch_id",
|
||||
"in": "path",
|
||||
"description": "The ID of the file batch to cancel.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vector_store_id",
|
||||
"in": "path",
|
||||
"description": "The ID of the vector store containing the file batch.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/completions": {
|
||||
"post": {
|
||||
"responses": {
|
||||
|
@ -4898,6 +4951,60 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/v1/vector_stores/{vector_store_id}/file_batches": {
|
||||
"post": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A VectorStoreFileBatchObject representing the created file batch.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/VectorStoreFileBatchObject"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest400"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/TooManyRequests429"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalServerError500"
|
||||
},
|
||||
"default": {
|
||||
"$ref": "#/components/responses/DefaultError"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"VectorIO"
|
||||
],
|
||||
"summary": "Create a vector store file batch.",
|
||||
"description": "Create a vector store file batch.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "vector_store_id",
|
||||
"in": "path",
|
||||
"description": "The ID of the vector store to create the file batch for.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/OpenaiCreateVectorStoreFileBatchRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/files/{file_id}": {
|
||||
"get": {
|
||||
"responses": {
|
||||
|
@ -5460,6 +5567,104 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files": {
|
||||
"get": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A VectorStoreFilesListInBatchResponse containing the list of files in the batch.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/VectorStoreFilesListInBatchResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest400"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/TooManyRequests429"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalServerError500"
|
||||
},
|
||||
"default": {
|
||||
"$ref": "#/components/responses/DefaultError"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"VectorIO"
|
||||
],
|
||||
"summary": "Returns a list of vector store files in a batch.",
|
||||
"description": "Returns a list of vector store files in a batch.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "batch_id",
|
||||
"in": "path",
|
||||
"description": "The ID of the file batch to list files from.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vector_store_id",
|
||||
"in": "path",
|
||||
"description": "The ID of the vector store containing the file batch.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "after",
|
||||
"in": "query",
|
||||
"description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "before",
|
||||
"in": "query",
|
||||
"description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "filter",
|
||||
"in": "query",
|
||||
"description": "Filter by file status. One of in_progress, completed, failed, cancelled.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "order",
|
||||
"in": "query",
|
||||
"description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/files/{file_id}/content": {
|
||||
"get": {
|
||||
"responses": {
|
||||
|
@ -5504,6 +5709,59 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}": {
|
||||
"get": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A VectorStoreFileBatchObject representing the file batch.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/VectorStoreFileBatchObject"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest400"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/TooManyRequests429"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalServerError500"
|
||||
},
|
||||
"default": {
|
||||
"$ref": "#/components/responses/DefaultError"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"VectorIO"
|
||||
],
|
||||
"summary": "Retrieve a vector store file batch.",
|
||||
"description": "Retrieve a vector store file batch.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "batch_id",
|
||||
"in": "path",
|
||||
"description": "The ID of the file batch to retrieve.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vector_store_id",
|
||||
"in": "path",
|
||||
"description": "The ID of the vector store containing the file batch.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/vector_stores/{vector_store_id}/files/{file_id}/content": {
|
||||
"get": {
|
||||
"responses": {
|
||||
|
@ -14710,6 +14968,82 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"VectorStoreFileBatchObject": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Unique identifier for the file batch"
|
||||
},
|
||||
"object": {
|
||||
"type": "string",
|
||||
"default": "vector_store.file_batch",
|
||||
"description": "Object type identifier, always \"vector_store.file_batch\""
|
||||
},
|
||||
"created_at": {
|
||||
"type": "integer",
|
||||
"description": "Timestamp when the file batch was created"
|
||||
},
|
||||
"vector_store_id": {
|
||||
"type": "string",
|
||||
"description": "ID of the vector store containing the file batch"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/components/schemas/VectorStoreFileStatus",
|
||||
"description": "Current processing status of the file batch"
|
||||
},
|
||||
"file_counts": {
|
||||
"$ref": "#/components/schemas/VectorStoreFileCounts",
|
||||
"description": "File processing status counts for the batch"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"object",
|
||||
"created_at",
|
||||
"vector_store_id",
|
||||
"status",
|
||||
"file_counts"
|
||||
],
|
||||
"title": "VectorStoreFileBatchObject",
|
||||
"description": "OpenAI Vector Store File Batch object."
|
||||
},
|
||||
"VectorStoreFileCounts": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"completed": {
|
||||
"type": "integer",
|
||||
"description": "Number of files that have been successfully processed"
|
||||
},
|
||||
"cancelled": {
|
||||
"type": "integer",
|
||||
"description": "Number of files that had their processing cancelled"
|
||||
},
|
||||
"failed": {
|
||||
"type": "integer",
|
||||
"description": "Number of files that failed to process"
|
||||
},
|
||||
"in_progress": {
|
||||
"type": "integer",
|
||||
"description": "Number of files currently being processed"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"description": "Total number of files in the vector store"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"completed",
|
||||
"cancelled",
|
||||
"failed",
|
||||
"in_progress",
|
||||
"total"
|
||||
],
|
||||
"title": "VectorStoreFileCounts",
|
||||
"description": "File processing status counts for a vector store."
|
||||
},
|
||||
"OpenAIJSONSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -15541,41 +15875,6 @@
|
|||
"additionalProperties": false,
|
||||
"title": "OpenaiCreateVectorStoreRequest"
|
||||
},
|
||||
"VectorStoreFileCounts": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"completed": {
|
||||
"type": "integer",
|
||||
"description": "Number of files that have been successfully processed"
|
||||
},
|
||||
"cancelled": {
|
||||
"type": "integer",
|
||||
"description": "Number of files that had their processing cancelled"
|
||||
},
|
||||
"failed": {
|
||||
"type": "integer",
|
||||
"description": "Number of files that failed to process"
|
||||
},
|
||||
"in_progress": {
|
||||
"type": "integer",
|
||||
"description": "Number of files currently being processed"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"description": "Total number of files in the vector store"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"completed",
|
||||
"cancelled",
|
||||
"failed",
|
||||
"in_progress",
|
||||
"total"
|
||||
],
|
||||
"title": "VectorStoreFileCounts",
|
||||
"description": "File processing status counts for a vector store."
|
||||
},
|
||||
"VectorStoreObject": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -15684,6 +15983,53 @@
|
|||
"title": "VectorStoreObject",
|
||||
"description": "OpenAI Vector Store object."
|
||||
},
|
||||
"OpenaiCreateVectorStoreFileBatchRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"file_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "A list of File IDs that the vector store should use."
|
||||
},
|
||||
"attributes": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "(Optional) Key-value attributes to store with the files."
|
||||
},
|
||||
"chunking_strategy": {
|
||||
"$ref": "#/components/schemas/VectorStoreChunkingStrategy",
|
||||
"description": "(Optional) The chunking strategy used to chunk the file(s). Defaults to auto."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"file_ids"
|
||||
],
|
||||
"title": "OpenaiCreateVectorStoreFileBatchRequest"
|
||||
},
|
||||
"OpenAIFileDeleteResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -16036,6 +16382,44 @@
|
|||
"title": "VectorStoreListFilesResponse",
|
||||
"description": "Response from listing files in a vector store."
|
||||
},
|
||||
"VectorStoreFilesListInBatchResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"object": {
|
||||
"type": "string",
|
||||
"default": "list",
|
||||
"description": "Object type identifier, always \"list\""
|
||||
},
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/VectorStoreFileObject"
|
||||
},
|
||||
"description": "List of vector store file objects in the batch"
|
||||
},
|
||||
"first_id": {
|
||||
"type": "string",
|
||||
"description": "(Optional) ID of the first file in the list for pagination"
|
||||
},
|
||||
"last_id": {
|
||||
"type": "string",
|
||||
"description": "(Optional) ID of the last file in the list for pagination"
|
||||
},
|
||||
"has_more": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Whether there are more files available beyond this page"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"object",
|
||||
"data",
|
||||
"has_more"
|
||||
],
|
||||
"title": "VectorStoreFilesListInBatchResponse",
|
||||
"description": "Response from listing files in a vector store file batch."
|
||||
},
|
||||
"VectorStoreListResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue