mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-30 11:26:23 +02:00
json/markdown format
This commit is contained in:
parent
7ec77e0ad7
commit
0d9bbcb863
6 changed files with 17 additions and 14 deletions
|
|
@ -8,10 +8,10 @@
|
|||
from metagpt.config import CONFIG
|
||||
|
||||
|
||||
def get_template(templates):
|
||||
selected_templates = templates.get(CONFIG.prompt_format)
|
||||
def get_template(templates, format=CONFIG.prompt_format):
|
||||
selected_templates = templates.get(format)
|
||||
if selected_templates is None:
|
||||
raise ValueError(f"Can't find {CONFIG.prompt_format} in passed in templates")
|
||||
raise ValueError(f"Can't find {format} in passed in templates")
|
||||
|
||||
# Extract the selected templates
|
||||
prompt_template = selected_templates["PROMPT_TEMPLATE"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue