| 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. |
| 2 | # All rights reserved. |
| 3 | # |
| 4 | # This source code is licensed under the terms described in the LICENSE file in |
| 5 | # the root directory of this source tree. |
| 6 | |
| 7 | from typing import Optional |
| 8 | |
| 9 | from llama_models.schema_utils import json_schema_type |
| 10 | from pydantic import BaseModel, Field |
| 11 | |
| 12 | |
| 13 | @json_schema_type |
| 14 | class RedisImplConfig(BaseModel): |
| 15 | url: str = Field( |
| 16 | description="The URL for the Redis server", |
| 17 | ) |
| 18 | namespace: Optional[str] = Field( |
| 19 | default=None, |
| 20 | description="All keys will be prefixed with this namespace", |
| 21 | ) |