mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-26 11:18:04 +00:00
feat: configure vector-io provider with an embedding model
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
This commit is contained in:
parent
1f0766308d
commit
d8f013b35a
29 changed files with 228 additions and 24 deletions
|
|
@ -9,6 +9,7 @@ from typing import Any
|
|||
from pydantic import BaseModel, Field
|
||||
|
||||
from llama_stack.providers.utils.kvstore.config import KVStoreConfig, SqliteKVStoreConfig
|
||||
from llama_stack.providers.utils.vector_io.embedding_config import EmbeddingConfig
|
||||
from llama_stack.schema_utils import json_schema_type
|
||||
|
||||
|
||||
|
|
@ -16,6 +17,10 @@ from llama_stack.schema_utils import json_schema_type
|
|||
class ChromaVectorIOConfig(BaseModel):
|
||||
db_path: str
|
||||
kvstore: KVStoreConfig = Field(description="Config for KV store backend")
|
||||
embedding: EmbeddingConfig | None = Field(
|
||||
default=None,
|
||||
description="Default embedding configuration for this provider. When specified, vector databases created with this provider will use these embedding settings as defaults.",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def sample_run_config(
|
||||
|
|
@ -27,4 +32,9 @@ class ChromaVectorIOConfig(BaseModel):
|
|||
__distro_dir__=__distro_dir__,
|
||||
db_name="chroma_inline_registry.db",
|
||||
),
|
||||
# Optional: Configure default embedding model for this provider
|
||||
# "embedding": {
|
||||
# "model": "${env.CHROMA_EMBEDDING_MODEL:=all-MiniLM-L6-v2}",
|
||||
# "dimensions": 384
|
||||
# },
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue