update log_parse_json and custom werewolf num in prompt

This commit is contained in:
better629 2024-04-10 17:42:56 +08:00
parent c43a1cada7
commit ade46df232
5 changed files with 19 additions and 12 deletions

View file

@ -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]