mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-13 04:22:35 +00:00
chore: Updating how default embedding model is set in stack
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com> # Conflicts: # .github/workflows/integration-vector-io-tests.yml # llama_stack/distributions/ci-tests/run.yaml # llama_stack/distributions/starter-gpu/run.yaml # llama_stack/distributions/starter/run.yaml # llama_stack/distributions/template.py # llama_stack/providers/utils/memory/openai_vector_store_mixin.py
This commit is contained in:
parent
cd152f4240
commit
24a1430c8b
32 changed files with 276 additions and 265 deletions
|
|
@ -239,3 +239,5 @@ server:
|
|||
port: 8321
|
||||
telemetry:
|
||||
enabled: true
|
||||
vector_stores:
|
||||
default_embedding_model_id: sentence-transformers/nomic-ai/nomic-embed-text-v1.5
|
||||
|
|
|
|||
|
|
@ -240,5 +240,7 @@ tool_groups:
|
|||
provider_id: rag-runtime
|
||||
server:
|
||||
port: 8321
|
||||
vector_stores:
|
||||
default_embedding_model_id: sentence-transformers/nomic-ai/nomic-embed-text-v1.5
|
||||
telemetry:
|
||||
enabled: true
|
||||
|
|
|
|||
|
|
@ -239,3 +239,5 @@ server:
|
|||
port: 8321
|
||||
telemetry:
|
||||
enabled: true
|
||||
vector_stores:
|
||||
default_embedding_model_id: sentence-transformers/nomic-ai/nomic-embed-text-v1.5
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ from llama_stack.core.datatypes import (
|
|||
ProviderSpec,
|
||||
ShieldInput,
|
||||
ToolGroupInput,
|
||||
VectorStoresConfig,
|
||||
)
|
||||
from llama_stack.core.utils.dynamic import instantiate_class_type
|
||||
from llama_stack.distributions.template import DistributionTemplate, RunConfigSettings
|
||||
|
|
@ -227,6 +228,9 @@ def get_distribution_template(name: str = "starter") -> DistributionTemplate:
|
|||
default_models=[],
|
||||
default_tool_groups=default_tool_groups,
|
||||
default_shields=default_shields,
|
||||
vector_stores_config=VectorStoresConfig(
|
||||
default_embedding_model_id="sentence-transformers/nomic-ai/nomic-embed-text-v1.5"
|
||||
),
|
||||
),
|
||||
},
|
||||
run_config_env_vars={
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ from llama_stack.core.datatypes import (
|
|||
ShieldInput,
|
||||
TelemetryConfig,
|
||||
ToolGroupInput,
|
||||
VectorStoresConfig,
|
||||
)
|
||||
from llama_stack.core.distribution import get_provider_registry
|
||||
from llama_stack.core.utils.dynamic import instantiate_class_type
|
||||
|
|
@ -183,6 +184,7 @@ class RunConfigSettings(BaseModel):
|
|||
metadata_store: dict | None = None
|
||||
inference_store: dict | None = None
|
||||
conversations_store: dict | None = None
|
||||
vector_stores_config: VectorStoresConfig | None = None
|
||||
telemetry: TelemetryConfig = Field(default_factory=lambda: TelemetryConfig(enabled=True))
|
||||
|
||||
def run_config(
|
||||
|
|
@ -227,7 +229,7 @@ class RunConfigSettings(BaseModel):
|
|||
apis = sorted(providers.keys())
|
||||
|
||||
# Return a dict that matches StackRunConfig structure
|
||||
return {
|
||||
config = {
|
||||
"version": LLAMA_STACK_RUN_CONFIG_VERSION,
|
||||
"image_name": name,
|
||||
"container_image": container_image,
|
||||
|
|
@ -261,6 +263,11 @@ class RunConfigSettings(BaseModel):
|
|||
"telemetry": self.telemetry.model_dump(exclude_none=True) if self.telemetry else None,
|
||||
}
|
||||
|
||||
if self.vector_stores_config:
|
||||
config["vector_stores"] = self.vector_stores_config.model_dump(exclude_none=True)
|
||||
|
||||
return config
|
||||
|
||||
|
||||
class DistributionTemplate(BaseModel):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue