Spaces:
Sleeping
Sleeping
| """ | |
| Centralized Chroma configuration. | |
| The project intentionally uses a single persistent Chroma collection and separates | |
| different logical stores (KB docs, Tavily web cache, semantic cache, etc.) via a | |
| `namespace` metadata field. | |
| """ | |
| from __future__ import annotations | |
| import os | |
| PERSIST_DIRECTORY = "src/data/.chroma" | |
| COLLECTION_NAME = "finance_assistant" | |
| def ensure_persist_dir(path: str = PERSIST_DIRECTORY) -> str: | |
| os.makedirs(path, exist_ok=True) | |
| return path | |