Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

696 B
Raw Blame
# Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd.
# SPDX-License-Identifier: AGPL-3.0
from typing import Any, Dict

from pydantic import BaseModel, Field, model_validator


class CacheConfig(BaseModel):
    """Global cache Provider configuration shared by RAGFS modules."""

    provider: str = Field(description="Cache Provider name")
    params: Dict[str, Any] = Field(
        default_factory=dict,
        description="Provider-owned configuration parameters",
        repr=False,
    )

    @model_validator(mode="after")
    def validate_config(self):
        if not self.provider.strip():
            raise ValueError("cache provider must not be empty")
        return self