Spaces:
Running
Running
| """Utilities to load the system prompt from the prompts directory.""" | |
| from __future__ import annotations | |
| from pathlib import Path | |
| DEFAULT_PROMPT_PATH = Path("prompts/micro-trend-prompt.md") | |
| def load_system_prompt(path: Path | str = DEFAULT_PROMPT_PATH) -> str: | |
| prompt_path = Path(path) | |
| if not prompt_path.exists(): | |
| raise FileNotFoundError(f"Prompt file not found at {prompt_path}") | |
| return prompt_path.read_text(encoding="utf-8") | |