mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-23 16:37:28 +00:00
feat!: providers use unified 'persistence' field
BREAKING CHANGE: Provider config field names changed for semantic clarity - Rename kvstore → persistence for all providers - Simple providers: flat persistence with backend reference - Complex providers (agents): nested persistence.agent_state + persistence.responses - Files provider: metadata_store → persistence - Provider configs now clearly express 'how do I persist?' not 'what type of store?' Example: # Before config: kvstore: backend: kvstore namespace: faiss # After config: persistence: backend: kvstore namespace: faiss # Agents (nested) config: persistence: agent_state: backend: kvstore namespace: agents responses: backend: sqlstore namespace: responses
This commit is contained in:
parent
490110eba2
commit
ea233c2134
34 changed files with 126 additions and 106 deletions
|
@ -150,7 +150,7 @@ class ChromaVectorIOAdapter(OpenAIVectorStoreMixin, VectorIO, VectorDBsProtocolP
|
|||
self.files_api = files_api
|
||||
|
||||
async def initialize(self) -> None:
|
||||
self.kvstore = await kvstore_impl(self.config.kvstore)
|
||||
self.kvstore = await kvstore_impl(self.config.persistence)
|
||||
self.vector_db_store = self.kvstore
|
||||
|
||||
if isinstance(self.config, RemoteChromaVectorIOConfig):
|
||||
|
|
|
@ -15,13 +15,13 @@ from llama_stack.schema_utils import json_schema_type
|
|||
@json_schema_type
|
||||
class ChromaVectorIOConfig(BaseModel):
|
||||
url: str | None
|
||||
kvstore: KVStoreConfig = Field(description="Config for KV store backend")
|
||||
persistence: KVStoreConfig = Field(description="Config for KV store backend")
|
||||
|
||||
@classmethod
|
||||
def sample_run_config(cls, __distro_dir__: str, url: str = "${env.CHROMADB_URL}", **kwargs: Any) -> dict[str, Any]:
|
||||
return {
|
||||
"url": url,
|
||||
"kvstore": SqliteKVStoreConfig.sample_run_config(
|
||||
"persistence": SqliteKVStoreConfig.sample_run_config(
|
||||
__distro_dir__=__distro_dir__,
|
||||
db_name="chroma_remote_registry.db",
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue