- Patch Pytube - improve OS deletion of files and writing of files - Start working on Claude - Improve template management
16 lines
409 B
Python
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
|