Spaces:
Sleeping
Sleeping
File size: 454 Bytes
2948ced |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
"""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")
|