(prompt_path: str)
| 43 | |
| 44 | |
| 45 | def read_system_prompt(prompt_path: str) -> str: |
| 46 | |
| 47 | if not os.path.exists(prompt_path): |
| 48 | if "generation" in prompt_path: |
| 49 | return get_default_generation_prompt() |
| 50 | else: |
| 51 | raise FileNotFoundError(f"System prompt file not found: {prompt_path}") |
| 52 | |
| 53 | with open(prompt_path, 'r', encoding='utf-8') as f: |
| 54 | return f.read() |
| 55 | |
| 56 | |
| 57 | def get_default_generation_prompt() -> str: |
no test coverage detected