mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-07 14:26:44 +00:00
# What does this PR do? https://github.com/meta-llama/llama-stack/pull/2490 broke postgres_demo, as the config expected a str but the value was converted to int. This PR: 1. Updates the type of port in sqlstore to be int 2. template generation uses `dict` instead of `StackRunConfig` so as to avoid failing pydantic typechecks. 3. Adds `replace_env_vars` to StackRunConfig instantiation in `configure.py` (not sure why this wasn't needed before). ## Test Plan `llama stack build --template postgres_demo --image-type conda --run`
111 lines
3.2 KiB
YAML
111 lines
3.2 KiB
YAML
version: 2
|
|
image_name: postgres-demo
|
|
apis:
|
|
- agents
|
|
- inference
|
|
- safety
|
|
- telemetry
|
|
- tool_runtime
|
|
- vector_io
|
|
providers:
|
|
inference:
|
|
- provider_id: vllm-inference
|
|
provider_type: remote::vllm
|
|
config:
|
|
url: ${env.VLLM_URL:=http://localhost:8000/v1}
|
|
max_tokens: ${env.VLLM_MAX_TOKENS:=4096}
|
|
api_token: ${env.VLLM_API_TOKEN:=fake}
|
|
tls_verify: ${env.VLLM_TLS_VERIFY:=true}
|
|
- provider_id: sentence-transformers
|
|
provider_type: inline::sentence-transformers
|
|
config: {}
|
|
vector_io:
|
|
- provider_id: ${env.ENABLE_CHROMADB:+chromadb}
|
|
provider_type: remote::chromadb
|
|
config:
|
|
url: ${env.CHROMADB_URL:=}
|
|
safety:
|
|
- provider_id: llama-guard
|
|
provider_type: inline::llama-guard
|
|
config:
|
|
excluded_categories: []
|
|
agents:
|
|
- provider_id: meta-reference
|
|
provider_type: inline::meta-reference
|
|
config:
|
|
persistence_store:
|
|
type: postgres
|
|
host: ${env.POSTGRES_HOST:=localhost}
|
|
port: ${env.POSTGRES_PORT:=5432}
|
|
db: ${env.POSTGRES_DB:=llamastack}
|
|
user: ${env.POSTGRES_USER:=llamastack}
|
|
password: ${env.POSTGRES_PASSWORD:=llamastack}
|
|
responses_store:
|
|
type: postgres
|
|
host: ${env.POSTGRES_HOST:=localhost}
|
|
port: ${env.POSTGRES_PORT:=5432}
|
|
db: ${env.POSTGRES_DB:=llamastack}
|
|
user: ${env.POSTGRES_USER:=llamastack}
|
|
password: ${env.POSTGRES_PASSWORD:=llamastack}
|
|
telemetry:
|
|
- provider_id: meta-reference
|
|
provider_type: inline::meta-reference
|
|
config:
|
|
service_name: "${env.OTEL_SERVICE_NAME:=\u200B}"
|
|
sinks: ${env.TELEMETRY_SINKS:=console,otel_trace}
|
|
otel_trace_endpoint: ${env.OTEL_TRACE_ENDPOINT:=http://localhost:4318/v1/traces}
|
|
tool_runtime:
|
|
- provider_id: brave-search
|
|
provider_type: remote::brave-search
|
|
config:
|
|
api_key: ${env.BRAVE_SEARCH_API_KEY:=}
|
|
max_results: 3
|
|
- provider_id: tavily-search
|
|
provider_type: remote::tavily-search
|
|
config:
|
|
api_key: ${env.TAVILY_SEARCH_API_KEY:=}
|
|
max_results: 3
|
|
- provider_id: rag-runtime
|
|
provider_type: inline::rag-runtime
|
|
config: {}
|
|
- provider_id: model-context-protocol
|
|
provider_type: remote::model-context-protocol
|
|
config: {}
|
|
metadata_store:
|
|
type: postgres
|
|
host: ${env.POSTGRES_HOST:=localhost}
|
|
port: ${env.POSTGRES_PORT:=5432}
|
|
db: ${env.POSTGRES_DB:=llamastack}
|
|
user: ${env.POSTGRES_USER:=llamastack}
|
|
password: ${env.POSTGRES_PASSWORD:=llamastack}
|
|
table_name: ${env.POSTGRES_TABLE_NAME:=llamastack_kvstore}
|
|
inference_store:
|
|
type: postgres
|
|
host: ${env.POSTGRES_HOST:=localhost}
|
|
port: ${env.POSTGRES_PORT:=5432}
|
|
db: ${env.POSTGRES_DB:=llamastack}
|
|
user: ${env.POSTGRES_USER:=llamastack}
|
|
password: ${env.POSTGRES_PASSWORD:=llamastack}
|
|
models:
|
|
- metadata: {}
|
|
model_id: ${env.INFERENCE_MODEL}
|
|
provider_id: vllm-inference
|
|
model_type: llm
|
|
- metadata:
|
|
embedding_dimension: 384
|
|
model_id: all-MiniLM-L6-v2
|
|
provider_id: sentence-transformers
|
|
model_type: embedding
|
|
shields:
|
|
- shield_id: meta-llama/Llama-Guard-3-8B
|
|
vector_dbs: []
|
|
datasets: []
|
|
scoring_fns: []
|
|
benchmarks: []
|
|
tool_groups:
|
|
- toolgroup_id: builtin::websearch
|
|
provider_id: tavily-search
|
|
- toolgroup_id: builtin::rag
|
|
provider_id: rag-runtime
|
|
server:
|
|
port: 8321
|