- 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
This commit is contained in:
15
common/utils/prompt_loader.py
Normal file
15
common/utils/prompt_loader.py
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Reference in New Issue
Block a user