mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-12 12:06:04 +00:00
more fixes
This commit is contained in:
parent
bf59d26362
commit
e5a1cdf554
9 changed files with 43 additions and 146 deletions
30
docs/static/deprecated-llama-stack-spec.html
vendored
30
docs/static/deprecated-llama-stack-spec.html
vendored
|
|
@ -2623,17 +2623,7 @@
|
|||
],
|
||||
"summary": "Create a vector store file batch.",
|
||||
"description": "Create a vector store file batch.\nGenerate an OpenAI-compatible vector store file batch for the given vector store.",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
],
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
|
|
@ -12154,19 +12144,6 @@
|
|||
]
|
||||
},
|
||||
"description": "Set of key-value pairs that can be attached to the vector store"
|
||||
},
|
||||
"embedding_model": {
|
||||
"type": "string",
|
||||
"description": "(Optional) The embedding model to use for this vector store"
|
||||
},
|
||||
"embedding_dimension": {
|
||||
"type": "integer",
|
||||
"default": 384,
|
||||
"description": "(Optional) The dimension of the embedding vectors (default: 384)"
|
||||
},
|
||||
"provider_id": {
|
||||
"type": "string",
|
||||
"description": "(Optional) The ID of the provider to use for this vector store"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
|
@ -12344,6 +12321,10 @@
|
|||
"OpenAICreateVectorStoreFileBatchRequestWithExtraBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"vector_store_id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the vector store to create the file batch for"
|
||||
},
|
||||
"file_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -12384,6 +12365,7 @@
|
|||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"vector_store_id",
|
||||
"file_ids"
|
||||
],
|
||||
"title": "OpenAICreateVectorStoreFileBatchRequestWithExtraBody",
|
||||
|
|
|
|||
27
docs/static/deprecated-llama-stack-spec.yaml
vendored
27
docs/static/deprecated-llama-stack-spec.yaml
vendored
|
|
@ -1932,14 +1932,7 @@ paths:
|
|||
|
||||
Generate an OpenAI-compatible vector store file batch for the given vector
|
||||
store.
|
||||
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
|
||||
parameters: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
|
|
@ -9205,19 +9198,6 @@ components:
|
|||
- type: object
|
||||
description: >-
|
||||
Set of key-value pairs that can be attached to the vector store
|
||||
embedding_model:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) The embedding model to use for this vector store
|
||||
embedding_dimension:
|
||||
type: integer
|
||||
default: 384
|
||||
description: >-
|
||||
(Optional) The dimension of the embedding vectors (default: 384)
|
||||
provider_id:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) The ID of the provider to use for this vector store
|
||||
additionalProperties: false
|
||||
title: >-
|
||||
OpenAICreateVectorStoreRequestWithExtraBody
|
||||
|
|
@ -9346,6 +9326,10 @@ components:
|
|||
"OpenAICreateVectorStoreFileBatchRequestWithExtraBody":
|
||||
type: object
|
||||
properties:
|
||||
vector_store_id:
|
||||
type: string
|
||||
description: >-
|
||||
The ID of the vector store to create the file batch for
|
||||
file_ids:
|
||||
type: array
|
||||
items:
|
||||
|
|
@ -9371,6 +9355,7 @@ components:
|
|||
auto
|
||||
additionalProperties: false
|
||||
required:
|
||||
- vector_store_id
|
||||
- file_ids
|
||||
title: >-
|
||||
OpenAICreateVectorStoreFileBatchRequestWithExtraBody
|
||||
|
|
|
|||
30
docs/static/llama-stack-spec.html
vendored
30
docs/static/llama-stack-spec.html
vendored
|
|
@ -3357,17 +3357,7 @@
|
|||
],
|
||||
"summary": "Create a vector store file batch.",
|
||||
"description": "Create a vector store file batch.\nGenerate an OpenAI-compatible vector store file batch for the given vector store.",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
],
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
|
|
@ -12680,19 +12670,6 @@
|
|||
]
|
||||
},
|
||||
"description": "Set of key-value pairs that can be attached to the vector store"
|
||||
},
|
||||
"embedding_model": {
|
||||
"type": "string",
|
||||
"description": "(Optional) The embedding model to use for this vector store"
|
||||
},
|
||||
"embedding_dimension": {
|
||||
"type": "integer",
|
||||
"default": 384,
|
||||
"description": "(Optional) The dimension of the embedding vectors (default: 384)"
|
||||
},
|
||||
"provider_id": {
|
||||
"type": "string",
|
||||
"description": "(Optional) The ID of the provider to use for this vector store"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
|
@ -12870,6 +12847,10 @@
|
|||
"OpenAICreateVectorStoreFileBatchRequestWithExtraBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"vector_store_id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the vector store to create the file batch for"
|
||||
},
|
||||
"file_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -12910,6 +12891,7 @@
|
|||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"vector_store_id",
|
||||
"file_ids"
|
||||
],
|
||||
"title": "OpenAICreateVectorStoreFileBatchRequestWithExtraBody",
|
||||
|
|
|
|||
27
docs/static/llama-stack-spec.yaml
vendored
27
docs/static/llama-stack-spec.yaml
vendored
|
|
@ -2553,14 +2553,7 @@ paths:
|
|||
|
||||
Generate an OpenAI-compatible vector store file batch for the given vector
|
||||
store.
|
||||
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
|
||||
parameters: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
|
|
@ -9670,19 +9663,6 @@ components:
|
|||
- type: object
|
||||
description: >-
|
||||
Set of key-value pairs that can be attached to the vector store
|
||||
embedding_model:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) The embedding model to use for this vector store
|
||||
embedding_dimension:
|
||||
type: integer
|
||||
default: 384
|
||||
description: >-
|
||||
(Optional) The dimension of the embedding vectors (default: 384)
|
||||
provider_id:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) The ID of the provider to use for this vector store
|
||||
additionalProperties: false
|
||||
title: >-
|
||||
OpenAICreateVectorStoreRequestWithExtraBody
|
||||
|
|
@ -9811,6 +9791,10 @@ components:
|
|||
"OpenAICreateVectorStoreFileBatchRequestWithExtraBody":
|
||||
type: object
|
||||
properties:
|
||||
vector_store_id:
|
||||
type: string
|
||||
description: >-
|
||||
The ID of the vector store to create the file batch for
|
||||
file_ids:
|
||||
type: array
|
||||
items:
|
||||
|
|
@ -9836,6 +9820,7 @@ components:
|
|||
auto
|
||||
additionalProperties: false
|
||||
required:
|
||||
- vector_store_id
|
||||
- file_ids
|
||||
title: >-
|
||||
OpenAICreateVectorStoreFileBatchRequestWithExtraBody
|
||||
|
|
|
|||
30
docs/static/stainless-llama-stack-spec.html
vendored
30
docs/static/stainless-llama-stack-spec.html
vendored
|
|
@ -3357,17 +3357,7 @@
|
|||
],
|
||||
"summary": "Create a vector store file batch.",
|
||||
"description": "Create a vector store file batch.\nGenerate an OpenAI-compatible vector store file batch for the given vector store.",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
],
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
|
|
@ -14689,19 +14679,6 @@
|
|||
]
|
||||
},
|
||||
"description": "Set of key-value pairs that can be attached to the vector store"
|
||||
},
|
||||
"embedding_model": {
|
||||
"type": "string",
|
||||
"description": "(Optional) The embedding model to use for this vector store"
|
||||
},
|
||||
"embedding_dimension": {
|
||||
"type": "integer",
|
||||
"default": 384,
|
||||
"description": "(Optional) The dimension of the embedding vectors (default: 384)"
|
||||
},
|
||||
"provider_id": {
|
||||
"type": "string",
|
||||
"description": "(Optional) The ID of the provider to use for this vector store"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
|
@ -14879,6 +14856,10 @@
|
|||
"OpenAICreateVectorStoreFileBatchRequestWithExtraBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"vector_store_id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the vector store to create the file batch for"
|
||||
},
|
||||
"file_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -14919,6 +14900,7 @@
|
|||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"vector_store_id",
|
||||
"file_ids"
|
||||
],
|
||||
"title": "OpenAICreateVectorStoreFileBatchRequestWithExtraBody",
|
||||
|
|
|
|||
27
docs/static/stainless-llama-stack-spec.yaml
vendored
27
docs/static/stainless-llama-stack-spec.yaml
vendored
|
|
@ -2556,14 +2556,7 @@ paths:
|
|||
|
||||
Generate an OpenAI-compatible vector store file batch for the given vector
|
||||
store.
|
||||
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
|
||||
parameters: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
|
|
@ -11115,19 +11108,6 @@ components:
|
|||
- type: object
|
||||
description: >-
|
||||
Set of key-value pairs that can be attached to the vector store
|
||||
embedding_model:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) The embedding model to use for this vector store
|
||||
embedding_dimension:
|
||||
type: integer
|
||||
default: 384
|
||||
description: >-
|
||||
(Optional) The dimension of the embedding vectors (default: 384)
|
||||
provider_id:
|
||||
type: string
|
||||
description: >-
|
||||
(Optional) The ID of the provider to use for this vector store
|
||||
additionalProperties: false
|
||||
title: >-
|
||||
OpenAICreateVectorStoreRequestWithExtraBody
|
||||
|
|
@ -11256,6 +11236,10 @@ components:
|
|||
"OpenAICreateVectorStoreFileBatchRequestWithExtraBody":
|
||||
type: object
|
||||
properties:
|
||||
vector_store_id:
|
||||
type: string
|
||||
description: >-
|
||||
The ID of the vector store to create the file batch for
|
||||
file_ids:
|
||||
type: array
|
||||
items:
|
||||
|
|
@ -11281,6 +11265,7 @@ components:
|
|||
auto
|
||||
additionalProperties: false
|
||||
required:
|
||||
- vector_store_id
|
||||
- file_ids
|
||||
title: >-
|
||||
OpenAICreateVectorStoreFileBatchRequestWithExtraBody
|
||||
|
|
|
|||
|
|
@ -491,11 +491,13 @@ class OpenAICreateVectorStoreRequestWithExtraBody(BaseModel, extra="allow"):
|
|||
class OpenAICreateVectorStoreFileBatchRequestWithExtraBody(BaseModel, extra="allow"):
|
||||
"""Request to create a vector store file batch with extra_body support.
|
||||
|
||||
:param vector_store_id: The ID of the vector store to create the file batch for
|
||||
:param file_ids: A list of File IDs that the vector store should use
|
||||
:param attributes: (Optional) Key-value attributes to store with the files
|
||||
:param chunking_strategy: (Optional) The chunking strategy used to chunk the file(s). Defaults to auto
|
||||
"""
|
||||
|
||||
vector_store_id: str
|
||||
file_ids: list[str]
|
||||
attributes: dict[str, Any] | None = None
|
||||
chunking_strategy: VectorStoreChunkingStrategy | None = None
|
||||
|
|
@ -847,13 +849,11 @@ class VectorIO(Protocol):
|
|||
)
|
||||
async def openai_create_vector_store_file_batch(
|
||||
self,
|
||||
vector_store_id: str,
|
||||
params: Annotated[OpenAICreateVectorStoreFileBatchRequestWithExtraBody, Body(...)],
|
||||
) -> VectorStoreFileBatchObject:
|
||||
"""Create a vector store file batch.
|
||||
|
||||
Generate an OpenAI-compatible vector store file batch for the given vector store.
|
||||
:param vector_store_id: The ID of the vector store to create the file batch for.
|
||||
:returns: A VectorStoreFileBatchObject representing the created file batch.
|
||||
"""
|
||||
...
|
||||
|
|
|
|||
|
|
@ -383,17 +383,13 @@ class VectorIORouter(VectorIO):
|
|||
|
||||
async def openai_create_vector_store_file_batch(
|
||||
self,
|
||||
vector_store_id: str,
|
||||
params: Annotated[OpenAICreateVectorStoreFileBatchRequestWithExtraBody, Body(...)],
|
||||
) -> VectorStoreFileBatchObject:
|
||||
logger.debug(
|
||||
f"VectorIORouter.openai_create_vector_store_file_batch: {vector_store_id}, {len(params.file_ids)} files"
|
||||
)
|
||||
provider = await self.routing_table.get_provider_impl(vector_store_id)
|
||||
return await provider.openai_create_vector_store_file_batch(
|
||||
vector_store_id=vector_store_id,
|
||||
params=params,
|
||||
f"VectorIORouter.openai_create_vector_store_file_batch: {params.vector_store_id}, {len(params.file_ids)} files"
|
||||
)
|
||||
provider = await self.routing_table.get_provider_impl(params.vector_store_id)
|
||||
return await provider.openai_create_vector_store_file_batch(params)
|
||||
|
||||
async def openai_retrieve_vector_store_file_batch(
|
||||
self,
|
||||
|
|
|
|||
|
|
@ -978,10 +978,10 @@ class OpenAIVectorStoreMixin(ABC):
|
|||
|
||||
async def openai_create_vector_store_file_batch(
|
||||
self,
|
||||
vector_store_id: str,
|
||||
params: Annotated[OpenAICreateVectorStoreFileBatchRequestWithExtraBody, Body(...)],
|
||||
) -> VectorStoreFileBatchObject:
|
||||
"""Create a vector store file batch."""
|
||||
vector_store_id = params.vector_store_id
|
||||
if vector_store_id not in self.openai_vector_stores:
|
||||
raise VectorStoreNotFoundError(vector_store_id)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue