mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-22 16:23:08 +00:00
Fix discriminator ambiguity with context-aware backend parsing
- Both SqliteKVStoreConfig and SqliteSqlStoreConfig use type='sqlite' - Pydantic cannot distinguish them in a union - Solution: Custom validator parses backends based on which stores reference them - Metadata store requires KVStore, inference/conversations require SqlStore - Separate kvstore/sqlstore backends in configs for clarity
This commit is contained in:
parent
088a6ac652
commit
5672e70832
4 changed files with 157 additions and 37 deletions
|
@ -220,14 +220,17 @@ providers:
|
|||
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/batches.db
|
||||
persistence:
|
||||
backends:
|
||||
default:
|
||||
kvstore:
|
||||
type: sqlite
|
||||
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/store.db
|
||||
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/kvstore.db
|
||||
sqlstore:
|
||||
type: sqlite
|
||||
db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/sqlstore.db
|
||||
stores:
|
||||
metadata:
|
||||
backend: default
|
||||
backend: kvstore
|
||||
inference:
|
||||
backend: default
|
||||
backend: sqlstore
|
||||
models: []
|
||||
shields:
|
||||
- shield_id: llama-guard
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue