mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-23 08:33:09 +00:00
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
26 lines
747 B
Python
26 lines
747 B
Python
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the terms described in the LICENSE file in
|
|
# the root directory of this source tree.
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from llama_stack.providers.utils.kvstore.config import (
|
|
KVStoreConfig,
|
|
SqliteKVStoreConfig,
|
|
)
|
|
|
|
|
|
class HuggingfaceDatasetIOConfig(BaseModel):
|
|
persistence: KVStoreConfig
|
|
|
|
@classmethod
|
|
def sample_run_config(cls, __distro_dir__: str, **kwargs: Any) -> dict[str, Any]:
|
|
return {
|
|
"persistence": SqliteKVStoreConfig.sample_run_config(
|
|
__distro_dir__=__distro_dir__,
|
|
db_name="huggingface_datasetio.db",
|
|
)
|
|
}
|