mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-25 18:32:00 +00:00
vector io
This commit is contained in:
parent
3634bf05b4
commit
fa65de5fb3
4 changed files with 466 additions and 95 deletions
158
docs/_static/llama-stack-spec.yaml
vendored
158
docs/_static/llama-stack-spec.yaml
vendored
|
|
@ -2324,26 +2324,41 @@ paths:
|
|||
type: string
|
||||
- name: limit
|
||||
in: query
|
||||
description: >-
|
||||
(Optional) 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: >-
|
||||
(Optional) Sort order by the `created_at` timestamp of the objects. `asc`
|
||||
for ascending order and `desc` for descending order.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: after
|
||||
in: query
|
||||
description: >-
|
||||
(Optional) 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: >-
|
||||
(Optional) 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: >-
|
||||
(Optional) Filter by file status to only return files with the specified
|
||||
status.
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/components/schemas/VectorStoreFileStatus'
|
||||
|
|
@ -5629,11 +5644,17 @@ components:
|
|||
properties:
|
||||
ranker:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) Name of the ranking algorithm to use
|
||||
score_threshold:
|
||||
type: number
|
||||
default: 0.0
|
||||
description: >-
|
||||
(Optional) Minimum relevance score threshold for results
|
||||
additionalProperties: false
|
||||
title: SearchRankingOptions
|
||||
description: >-
|
||||
Options for ranking and filtering search results.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
|
|
@ -9013,10 +9034,14 @@ components:
|
|||
type: string
|
||||
const: auto
|
||||
default: auto
|
||||
description: >-
|
||||
Strategy type, always "auto" for automatic chunking
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
title: VectorStoreChunkingStrategyAuto
|
||||
description: >-
|
||||
Automatic chunking strategy for vector store files.
|
||||
VectorStoreChunkingStrategyStatic:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -9024,27 +9049,39 @@ components:
|
|||
type: string
|
||||
const: static
|
||||
default: static
|
||||
description: >-
|
||||
Strategy type, always "static" for static chunking
|
||||
static:
|
||||
$ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig'
|
||||
description: >-
|
||||
Configuration parameters for the static chunking strategy
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- static
|
||||
title: VectorStoreChunkingStrategyStatic
|
||||
description: >-
|
||||
Static chunking strategy with configurable parameters.
|
||||
VectorStoreChunkingStrategyStaticConfig:
|
||||
type: object
|
||||
properties:
|
||||
chunk_overlap_tokens:
|
||||
type: integer
|
||||
default: 400
|
||||
description: >-
|
||||
Number of tokens to overlap between adjacent chunks
|
||||
max_chunk_size_tokens:
|
||||
type: integer
|
||||
default: 800
|
||||
description: >-
|
||||
Maximum number of tokens per chunk, must be between 100 and 4096
|
||||
additionalProperties: false
|
||||
required:
|
||||
- chunk_overlap_tokens
|
||||
- max_chunk_size_tokens
|
||||
title: VectorStoreChunkingStrategyStaticConfig
|
||||
description: >-
|
||||
Configuration for static chunking strategy.
|
||||
OpenaiAttachFileToVectorStoreRequest:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -9081,21 +9118,30 @@ components:
|
|||
const: server_error
|
||||
- type: string
|
||||
const: rate_limit_exceeded
|
||||
description: >-
|
||||
Error code indicating the type of failure
|
||||
message:
|
||||
type: string
|
||||
description: >-
|
||||
Human-readable error message describing the failure
|
||||
additionalProperties: false
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
title: VectorStoreFileLastError
|
||||
description: >-
|
||||
Error information for failed vector store file processing.
|
||||
VectorStoreFileObject:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the file
|
||||
object:
|
||||
type: string
|
||||
default: vector_store.file
|
||||
description: >-
|
||||
Object type identifier, always "vector_store.file"
|
||||
attributes:
|
||||
type: object
|
||||
additionalProperties:
|
||||
|
|
@ -9106,19 +9152,31 @@ components:
|
|||
- type: string
|
||||
- type: array
|
||||
- type: object
|
||||
description: >-
|
||||
Key-value attributes associated with the file
|
||||
chunking_strategy:
|
||||
$ref: '#/components/schemas/VectorStoreChunkingStrategy'
|
||||
description: >-
|
||||
Strategy used for splitting the file into chunks
|
||||
created_at:
|
||||
type: integer
|
||||
description: >-
|
||||
Timestamp when the file was added to the vector store
|
||||
last_error:
|
||||
$ref: '#/components/schemas/VectorStoreFileLastError'
|
||||
description: >-
|
||||
(Optional) Error information if file processing failed
|
||||
status:
|
||||
$ref: '#/components/schemas/VectorStoreFileStatus'
|
||||
description: Current processing status of the file
|
||||
usage_bytes:
|
||||
type: integer
|
||||
default: 0
|
||||
description: Storage space used by this file in bytes
|
||||
vector_store_id:
|
||||
type: string
|
||||
description: >-
|
||||
ID of the vector store containing this file
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
|
|
@ -9714,14 +9772,23 @@ components:
|
|||
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
|
||||
|
|
@ -9730,26 +9797,39 @@ components:
|
|||
- in_progress
|
||||
- total
|
||||
title: VectorStoreFileCounts
|
||||
description: >-
|
||||
File processing status counts for a vector store.
|
||||
VectorStoreObject:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier for the vector store
|
||||
object:
|
||||
type: string
|
||||
default: vector_store
|
||||
description: >-
|
||||
Object type identifier, always "vector_store"
|
||||
created_at:
|
||||
type: integer
|
||||
description: >-
|
||||
Timestamp when the vector store was created
|
||||
name:
|
||||
type: string
|
||||
description: (Optional) Name of the vector store
|
||||
usage_bytes:
|
||||
type: integer
|
||||
default: 0
|
||||
description: >-
|
||||
Storage space used by the vector store in bytes
|
||||
file_counts:
|
||||
$ref: '#/components/schemas/VectorStoreFileCounts'
|
||||
description: >-
|
||||
File processing status counts for the vector store
|
||||
status:
|
||||
type: string
|
||||
default: completed
|
||||
description: Current status of the vector store
|
||||
expires_after:
|
||||
type: object
|
||||
additionalProperties:
|
||||
|
|
@ -9760,10 +9840,16 @@ components:
|
|||
- type: string
|
||||
- type: array
|
||||
- type: object
|
||||
description: >-
|
||||
(Optional) Expiration policy for the vector store
|
||||
expires_at:
|
||||
type: integer
|
||||
description: >-
|
||||
(Optional) Timestamp when the vector store will expire
|
||||
last_active_at:
|
||||
type: integer
|
||||
description: >-
|
||||
(Optional) Timestamp of last activity on the vector store
|
||||
metadata:
|
||||
type: object
|
||||
additionalProperties:
|
||||
|
|
@ -9774,6 +9860,8 @@ components:
|
|||
- type: string
|
||||
- type: array
|
||||
- type: object
|
||||
description: >-
|
||||
Set of key-value pairs that can be attached to the vector store
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
|
|
@ -9813,12 +9901,18 @@ components:
|
|||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: >-
|
||||
Unique identifier of the deleted vector store
|
||||
object:
|
||||
type: string
|
||||
default: vector_store.deleted
|
||||
description: >-
|
||||
Object type identifier for the deletion response
|
||||
deleted:
|
||||
type: boolean
|
||||
default: true
|
||||
description: >-
|
||||
Whether the deletion operation was successful
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
|
|
@ -9831,12 +9925,17 @@ components:
|
|||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique identifier of the deleted file
|
||||
object:
|
||||
type: string
|
||||
default: vector_store.file.deleted
|
||||
description: >-
|
||||
Object type identifier for the deletion response
|
||||
deleted:
|
||||
type: boolean
|
||||
default: true
|
||||
description: >-
|
||||
Whether the deletion operation was successful
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
|
|
@ -10042,24 +10141,33 @@ components:
|
|||
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
|
||||
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: VectorStoreListFilesResponse
|
||||
description: Response from listing vector stores.
|
||||
description: >-
|
||||
Response from listing files in a vector store.
|
||||
OpenAIModel:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -10098,17 +10206,25 @@ components:
|
|||
object:
|
||||
type: string
|
||||
default: list
|
||||
description: Object type identifier, always "list"
|
||||
data:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/VectorStoreObject'
|
||||
description: List of vector store objects
|
||||
first_id:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) ID of the first vector store in the list for pagination
|
||||
last_id:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) ID of the last vector store in the list for pagination
|
||||
has_more:
|
||||
type: boolean
|
||||
default: false
|
||||
description: >-
|
||||
Whether there are more vector stores available beyond this page
|
||||
additionalProperties: false
|
||||
required:
|
||||
- object
|
||||
|
|
@ -10125,20 +10241,27 @@ components:
|
|||
type:
|
||||
type: string
|
||||
const: text
|
||||
description: >-
|
||||
Content type, currently only "text" is supported
|
||||
text:
|
||||
type: string
|
||||
description: The actual text content
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- text
|
||||
title: VectorStoreContent
|
||||
description: >-
|
||||
Content item from a vector store file or search result.
|
||||
VectorStoreFileContentsResponse:
|
||||
type: object
|
||||
properties:
|
||||
file_id:
|
||||
type: string
|
||||
description: Unique identifier for the file
|
||||
filename:
|
||||
type: string
|
||||
description: Name of the file
|
||||
attributes:
|
||||
type: object
|
||||
additionalProperties:
|
||||
|
|
@ -10149,10 +10272,13 @@ components:
|
|||
- type: string
|
||||
- type: array
|
||||
- type: object
|
||||
description: >-
|
||||
Key-value attributes associated with the file
|
||||
content:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/VectorStoreContent'
|
||||
description: List of content items from the file
|
||||
additionalProperties: false
|
||||
required:
|
||||
- file_id
|
||||
|
|
@ -10194,9 +10320,13 @@ components:
|
|||
properties:
|
||||
ranker:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) Name of the ranking algorithm to use
|
||||
score_threshold:
|
||||
type: number
|
||||
default: 0.0
|
||||
description: >-
|
||||
(Optional) Minimum relevance score threshold for results
|
||||
additionalProperties: false
|
||||
description: >-
|
||||
Ranking options for fine-tuning the search results.
|
||||
|
|
@ -10218,10 +10348,14 @@ components:
|
|||
properties:
|
||||
file_id:
|
||||
type: string
|
||||
description: >-
|
||||
Unique identifier of the file containing the result
|
||||
filename:
|
||||
type: string
|
||||
description: Name of the file containing the result
|
||||
score:
|
||||
type: number
|
||||
description: Relevance score for this search result
|
||||
attributes:
|
||||
type: object
|
||||
additionalProperties:
|
||||
|
|
@ -10229,10 +10363,14 @@ components:
|
|||
- type: string
|
||||
- type: number
|
||||
- type: boolean
|
||||
description: >-
|
||||
(Optional) Key-value attributes associated with the file
|
||||
content:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/VectorStoreContent'
|
||||
description: >-
|
||||
List of content items matching the search query
|
||||
additionalProperties: false
|
||||
required:
|
||||
- file_id
|
||||
|
|
@ -10247,17 +10385,26 @@ components:
|
|||
object:
|
||||
type: string
|
||||
default: vector_store.search_results.page
|
||||
description: >-
|
||||
Object type identifier for the search results page
|
||||
search_query:
|
||||
type: string
|
||||
description: >-
|
||||
The original search query that was executed
|
||||
data:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/VectorStoreSearchResponse'
|
||||
description: List of search result objects
|
||||
has_more:
|
||||
type: boolean
|
||||
default: false
|
||||
description: >-
|
||||
Whether there are more results available beyond this page
|
||||
next_page:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) Token for retrieving the next page of results
|
||||
additionalProperties: false
|
||||
required:
|
||||
- object
|
||||
|
|
@ -10265,7 +10412,8 @@ components:
|
|||
- data
|
||||
- has_more
|
||||
title: VectorStoreSearchResponsePage
|
||||
description: Response from searching a vector store.
|
||||
description: >-
|
||||
Paginated response from searching a vector store.
|
||||
OpenaiUpdateVectorStoreRequest:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -10724,15 +10872,21 @@ components:
|
|||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Chunk'
|
||||
description: >-
|
||||
List of content chunks returned from the query
|
||||
scores:
|
||||
type: array
|
||||
items:
|
||||
type: number
|
||||
description: >-
|
||||
Relevance scores corresponding to each returned chunk
|
||||
additionalProperties: false
|
||||
required:
|
||||
- chunks
|
||||
- scores
|
||||
title: QueryChunksResponse
|
||||
description: >-
|
||||
Response from querying chunks in a vector database.
|
||||
QueryMetricsRequest:
|
||||
type: object
|
||||
properties:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue