mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-03 04:42:38 +02:00
update log_parse_json and custom werewolf num in prompt
This commit is contained in:
parent
c43a1cada7
commit
ade46df232
5 changed files with 19 additions and 12 deletions
|
|
@ -722,7 +722,8 @@ def list_files(root: str | Path) -> List[Path]:
|
|||
|
||||
|
||||
def parse_json_code_block(markdown_text: str) -> List[str]:
|
||||
json_blocks = re.findall(r"```json(.*?)```", markdown_text, re.DOTALL)
|
||||
json_blocks = re.findall(r"```json(.*?)```", markdown_text, re.DOTALL) if "```json" in markdown_text else [markdown_text]
|
||||
|
||||
return [v.strip() for v in json_blocks]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue