Spaces:
Sleeping
Sleeping
Create prompts.py
Browse files- agents/prompts.py +12 -0
agents/prompts.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import yaml
|
2 |
+
|
3 |
+
def load_prompts():
|
4 |
+
"""Load prompts.yaml and contentprompts.yml."""
|
5 |
+
with open("config/prompts.yaml", 'r') as stream:
|
6 |
+
prompt_templates = yaml.safe_load(stream)
|
7 |
+
|
8 |
+
with open("config/contentprompts.yml", 'r') as stream:
|
9 |
+
content_prompts = yaml.safe_load(stream)
|
10 |
+
|
11 |
+
combined_prompts = {**prompt_templates, **content_prompts}
|
12 |
+
return combined_prompts
|