mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-18 13:55:17 +02:00
parse_triple_quote
This commit is contained in:
parent
749c60e9eb
commit
dd8be8a382
4 changed files with 62 additions and 17 deletions
|
|
@ -77,7 +77,7 @@ class Action(ABC):
|
|||
logger.debug(content)
|
||||
output_class = ActionOutput.create_model_class(output_class_name, output_data_mapping)
|
||||
|
||||
pattern = r"\[CONTENT\](.*?)\[/CONTENT\]"
|
||||
pattern = r"\[CONTENT\](.+?)\[/CONTENT\]"
|
||||
|
||||
# Use re.findall to extract content between the tags
|
||||
extracted_content = re.search(pattern, content, re.DOTALL).group(1)
|
||||
|
|
|
|||
|
|
@ -68,8 +68,13 @@ FORMAT_EXAMPLE = """
|
|||
{
|
||||
"Original Requirements": "",
|
||||
"Search Information": "",
|
||||
"mermaid quadrantChart code": '
|
||||
quadrantChart
|
||||
|
||||
"Role": "You are a professional product manager; the goal is to design a concise, usable, efficient product",
|
||||
"Requirements": "",
|
||||
"Product Goals": [],
|
||||
"User Stories": [],
|
||||
"Competitive Analysis": [],
|
||||
"Competitive Quadrant Chart": "quadrantChart
|
||||
title Reach and engagement of campaigns
|
||||
x-axis Low Reach --> High Reach
|
||||
y-axis Low Engagement --> High Engagement
|
||||
|
|
@ -82,17 +87,7 @@ FORMAT_EXAMPLE = """
|
|||
Campaign C: [0.57, 0.69]
|
||||
Campaign D: [0.78, 0.34]
|
||||
Campaign E: [0.40, 0.34]
|
||||
Campaign F: [0.35, 0.78]
|
||||
'
|
||||
,
|
||||
|
||||
},
|
||||
"Role": "You are a professional product manager; the goal is to design a concise, usable, efficient product",
|
||||
"Requirements": "",
|
||||
"Product Goals": [],
|
||||
"User Stories": [],
|
||||
"Competitive Analysis": [],
|
||||
"Competitive Quadrant Chart": "",
|
||||
Campaign F: [0.35, 0.78]",
|
||||
"Requirement Analysis": "",
|
||||
"Requirement Pool": [["P0","P0 requirement"],["P1","P1 requirement"]],
|
||||
"UI Design draft": "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue