Files
eveAI/common/utils/prompt_loader.py
Josako 908a2eaf7e - Improve annotation algorithm for Youtube (and others)
- Patch Pytube
- improve OS deletion of files and writing of files
- Start working on Claude
- Improve template management
2024-07-16 14:21:49 +02:00

16 lines
409 B
Python

import os
import yaml
def load_prompt_templates(model_name):
provider, model = model_name.split('.')
file_path = os.path.join('config', 'prompts', provider, f'{model}.yaml')
if not os.path.exists(file_path):
raise FileNotFoundError(f"No prompt template file found for {model_name}")
with open(file_path, 'r') as file:
templates = yaml.safe_load(file)
return templates