mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
fix: vector_store: misc fixes
# What does this PR do? ## Test Plan
This commit is contained in:
parent
628e38b3d5
commit
5f94bec55f
7 changed files with 287 additions and 302 deletions
|
|
@ -11038,6 +11038,70 @@ components:
|
|||
- metadata
|
||||
title: VectorStoreObject
|
||||
description: OpenAI Vector Store object.
|
||||
VectorStoreChunkingStrategy:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
auto: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
static: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
VectorStoreChunkingStrategyAuto:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
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:
|
||||
type:
|
||||
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.
|
||||
"OpenAICreateVectorStoreRequestWithExtraBody":
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -11063,15 +11127,7 @@ components:
|
|||
description: >-
|
||||
(Optional) Expiration policy for the vector store
|
||||
chunking_strategy:
|
||||
type: object
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: 'null'
|
||||
- type: boolean
|
||||
- type: number
|
||||
- type: string
|
||||
- type: array
|
||||
- type: object
|
||||
$ref: '#/components/schemas/VectorStoreChunkingStrategy'
|
||||
description: >-
|
||||
(Optional) Strategy for splitting files into chunks
|
||||
metadata:
|
||||
|
|
@ -11147,70 +11203,6 @@ components:
|
|||
- deleted
|
||||
title: VectorStoreDeleteResponse
|
||||
description: Response from deleting a vector store.
|
||||
VectorStoreChunkingStrategy:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
auto: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
static: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
VectorStoreChunkingStrategyAuto:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
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:
|
||||
type:
|
||||
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.
|
||||
"OpenAICreateVectorStoreFileBatchRequestWithExtraBody":
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -11668,7 +11660,9 @@ components:
|
|||
description: >-
|
||||
Object type identifier for the search results page
|
||||
search_query:
|
||||
type: string
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: >-
|
||||
The original search query that was executed
|
||||
data:
|
||||
|
|
|
|||
142
docs/static/deprecated-llama-stack-spec.yaml
vendored
142
docs/static/deprecated-llama-stack-spec.yaml
vendored
|
|
@ -9470,6 +9470,70 @@ components:
|
|||
- metadata
|
||||
title: VectorStoreObject
|
||||
description: OpenAI Vector Store object.
|
||||
VectorStoreChunkingStrategy:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
auto: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
static: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
VectorStoreChunkingStrategyAuto:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
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:
|
||||
type:
|
||||
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.
|
||||
"OpenAICreateVectorStoreRequestWithExtraBody":
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -9495,15 +9559,7 @@ components:
|
|||
description: >-
|
||||
(Optional) Expiration policy for the vector store
|
||||
chunking_strategy:
|
||||
type: object
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: 'null'
|
||||
- type: boolean
|
||||
- type: number
|
||||
- type: string
|
||||
- type: array
|
||||
- type: object
|
||||
$ref: '#/components/schemas/VectorStoreChunkingStrategy'
|
||||
description: >-
|
||||
(Optional) Strategy for splitting files into chunks
|
||||
metadata:
|
||||
|
|
@ -9579,70 +9635,6 @@ components:
|
|||
- deleted
|
||||
title: VectorStoreDeleteResponse
|
||||
description: Response from deleting a vector store.
|
||||
VectorStoreChunkingStrategy:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
auto: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
static: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
VectorStoreChunkingStrategyAuto:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
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:
|
||||
type:
|
||||
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.
|
||||
"OpenAICreateVectorStoreFileBatchRequestWithExtraBody":
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -10100,7 +10092,9 @@ components:
|
|||
description: >-
|
||||
Object type identifier for the search results page
|
||||
search_query:
|
||||
type: string
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: >-
|
||||
The original search query that was executed
|
||||
data:
|
||||
|
|
|
|||
142
docs/static/llama-stack-spec.yaml
vendored
142
docs/static/llama-stack-spec.yaml
vendored
|
|
@ -9825,6 +9825,70 @@ components:
|
|||
- metadata
|
||||
title: VectorStoreObject
|
||||
description: OpenAI Vector Store object.
|
||||
VectorStoreChunkingStrategy:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
auto: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
static: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
VectorStoreChunkingStrategyAuto:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
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:
|
||||
type:
|
||||
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.
|
||||
"OpenAICreateVectorStoreRequestWithExtraBody":
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -9850,15 +9914,7 @@ components:
|
|||
description: >-
|
||||
(Optional) Expiration policy for the vector store
|
||||
chunking_strategy:
|
||||
type: object
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: 'null'
|
||||
- type: boolean
|
||||
- type: number
|
||||
- type: string
|
||||
- type: array
|
||||
- type: object
|
||||
$ref: '#/components/schemas/VectorStoreChunkingStrategy'
|
||||
description: >-
|
||||
(Optional) Strategy for splitting files into chunks
|
||||
metadata:
|
||||
|
|
@ -9934,70 +9990,6 @@ components:
|
|||
- deleted
|
||||
title: VectorStoreDeleteResponse
|
||||
description: Response from deleting a vector store.
|
||||
VectorStoreChunkingStrategy:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
auto: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
static: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
VectorStoreChunkingStrategyAuto:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
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:
|
||||
type:
|
||||
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.
|
||||
"OpenAICreateVectorStoreFileBatchRequestWithExtraBody":
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -10455,7 +10447,9 @@ components:
|
|||
description: >-
|
||||
Object type identifier for the search results page
|
||||
search_query:
|
||||
type: string
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: >-
|
||||
The original search query that was executed
|
||||
data:
|
||||
|
|
|
|||
142
docs/static/stainless-llama-stack-spec.yaml
vendored
142
docs/static/stainless-llama-stack-spec.yaml
vendored
|
|
@ -11038,6 +11038,70 @@ components:
|
|||
- metadata
|
||||
title: VectorStoreObject
|
||||
description: OpenAI Vector Store object.
|
||||
VectorStoreChunkingStrategy:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
auto: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
static: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
VectorStoreChunkingStrategyAuto:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
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:
|
||||
type:
|
||||
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.
|
||||
"OpenAICreateVectorStoreRequestWithExtraBody":
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -11063,15 +11127,7 @@ components:
|
|||
description: >-
|
||||
(Optional) Expiration policy for the vector store
|
||||
chunking_strategy:
|
||||
type: object
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: 'null'
|
||||
- type: boolean
|
||||
- type: number
|
||||
- type: string
|
||||
- type: array
|
||||
- type: object
|
||||
$ref: '#/components/schemas/VectorStoreChunkingStrategy'
|
||||
description: >-
|
||||
(Optional) Strategy for splitting files into chunks
|
||||
metadata:
|
||||
|
|
@ -11147,70 +11203,6 @@ components:
|
|||
- deleted
|
||||
title: VectorStoreDeleteResponse
|
||||
description: Response from deleting a vector store.
|
||||
VectorStoreChunkingStrategy:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
- $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
auto: '#/components/schemas/VectorStoreChunkingStrategyAuto'
|
||||
static: '#/components/schemas/VectorStoreChunkingStrategyStatic'
|
||||
VectorStoreChunkingStrategyAuto:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
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:
|
||||
type:
|
||||
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.
|
||||
"OpenAICreateVectorStoreFileBatchRequestWithExtraBody":
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -11668,7 +11660,9 @@ components:
|
|||
description: >-
|
||||
Object type identifier for the search results page
|
||||
search_query:
|
||||
type: string
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: >-
|
||||
The original search query that was executed
|
||||
data:
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ class VectorStoreSearchResponsePage(BaseModel):
|
|||
"""
|
||||
|
||||
object: str = "vector_store.search_results.page"
|
||||
search_query: str
|
||||
search_query: list[str]
|
||||
data: list[VectorStoreSearchResponse]
|
||||
has_more: bool = False
|
||||
next_page: str | None = None
|
||||
|
|
@ -478,7 +478,7 @@ class OpenAICreateVectorStoreRequestWithExtraBody(BaseModel, extra="allow"):
|
|||
name: str | None = None
|
||||
file_ids: list[str] | None = None
|
||||
expires_after: dict[str, Any] | None = None
|
||||
chunking_strategy: dict[str, Any] | None = None
|
||||
chunking_strategy: VectorStoreChunkingStrategy | None = None
|
||||
metadata: dict[str, Any] | None = None
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ from llama_stack.apis.vector_io import (
|
|||
SearchRankingOptions,
|
||||
VectorIO,
|
||||
VectorStoreChunkingStrategy,
|
||||
VectorStoreChunkingStrategyStatic,
|
||||
VectorStoreChunkingStrategyStaticConfig,
|
||||
VectorStoreDeleteResponse,
|
||||
VectorStoreFileBatchObject,
|
||||
VectorStoreFileContentsResponse,
|
||||
|
|
@ -167,6 +169,13 @@ class VectorIORouter(VectorIO):
|
|||
if embedding_dimension is not None:
|
||||
params.model_extra["embedding_dimension"] = embedding_dimension
|
||||
|
||||
# Set chunking strategy explicitly if not provided
|
||||
if params.chunking_strategy is None or params.chunking_strategy.type == "auto":
|
||||
# actualize the chunking strategy to static
|
||||
params.chunking_strategy = VectorStoreChunkingStrategyStatic(
|
||||
static=VectorStoreChunkingStrategyStaticConfig()
|
||||
)
|
||||
|
||||
return await provider.openai_create_vector_store(params)
|
||||
|
||||
async def openai_list_vector_stores(
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ def test_openai_vector_store_search_empty(
|
|||
assert search_response is not None
|
||||
assert hasattr(search_response, "data")
|
||||
assert len(search_response.data) == 0 # Empty store should return no results
|
||||
assert search_response.search_query == "test query"
|
||||
assert search_response.search_query == ["test query"]
|
||||
assert search_response.has_more is False
|
||||
|
||||
|
||||
|
|
@ -679,7 +679,7 @@ def test_openai_vector_store_attach_file(
|
|||
assert file_attach_response.id == file.id
|
||||
assert file_attach_response.vector_store_id == vector_store.id
|
||||
assert file_attach_response.status == "completed"
|
||||
assert file_attach_response.chunking_strategy.type == "auto"
|
||||
assert file_attach_response.chunking_strategy.type == "static"
|
||||
assert file_attach_response.created_at > 0
|
||||
assert not file_attach_response.last_error
|
||||
|
||||
|
|
@ -815,8 +815,8 @@ def test_openai_vector_store_list_files(
|
|||
assert set(file_ids) == {file.id for file in files_list.data}
|
||||
assert files_list.data[0].object == "vector_store.file"
|
||||
assert files_list.data[0].vector_store_id == vector_store.id
|
||||
assert files_list.data[0].status == "completed"
|
||||
assert files_list.data[0].chunking_strategy.type == "auto"
|
||||
assert files_list.data[0].status in ["completed", "in_progress"]
|
||||
assert files_list.data[0].chunking_strategy.type == "static"
|
||||
assert files_list.data[0].created_at > 0
|
||||
assert files_list.first_id == files_list.data[0].id
|
||||
assert not files_list.data[0].last_error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue