🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
simplify save_webpages in gpt_v_generator.py
mannaandpoem478ba13b5f1e
diff --git a/metagpt/tools/libs/gpt_v_generator.py b/metagpt/tools/libs/gpt_v_generator.pyindex bcca0df7b..f24a473bf 100644--- a/metagpt/tools/libs/gpt_v_generator.py+++ b/metagpt/tools/libs/gpt_v_generator.py@@ -5,7 +5,6 @@@Author : mannaandpoem@File : gpt_v_generator.py"""-import osimport refrom pathlib import Path@@ -87,7 +86,7 @@ class GPTvGenerator:# Create a folder called webpages in the workspace directory to store HTML, CSS, and JavaScript fileswebpages_path = DEFAULT_WORKSPACE_ROOT / "webpages" / save_folder_namelogger.info(f"code will be saved at {webpages_path}")- os.makedirs(webpages_path, exist_ok=True)+ webpages_path.mkdir(parents=True, exist_ok=True)index_path = webpages_path / "index.html"index_path.write_text(CodeParser.parse_code(block=None, text=webpages, lang="html"))