🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
make tot follow format in 3.5-turbo
geekan99e10b235bcb
diff --git a/metagpt/strategy/tot.py b/metagpt/strategy/tot.pyindex ce94d0de1..88c2ac9ff 100644--- a/metagpt/strategy/tot.py+++ b/metagpt/strategy/tot.py@@ -17,7 +17,7 @@ from metagpt.strategy.tot_schema import MethodSelect, Strategy, ThoughtSolverConfrom metagpt.utils.common import CodeParserOUTPUT_FORMAT = """-Output a list of jsons following the format:+Each output should be strictly a list of nodes, in json format, like this:```json[{diff --git a/tests/metagpt/strategy/examples/creative_writing.py b/tests/metagpt/strategy/examples/creative_writing.pyindex 59a3c94d7..ff1d4147c 100644--- a/tests/metagpt/strategy/examples/creative_writing.py+++ b/tests/metagpt/strategy/examples/creative_writing.py@@ -71,7 +71,7 @@ def test_creative_writing():parser = TextGenParser()evaluator = TextGenEvaluator()- config = ThoughtSolverConfig(n_generate_sample=3, parser=parser, evaluator=evaluator)+ config = ThoughtSolverConfig(max_step=2, n_generate_sample=1, n_select_sample=1, parser=parser, evaluator=evaluator)tot_base = TreeofThought(strategy=Strategy.BFS, config=config)asyncio.run(tot_base.solve(init_prompt=initial_prompt))diff --git a/tests/metagpt/strategy/prompt_templates/creative_writing.py b/tests/metagpt/strategy/prompt_templates/creative_writing.pyindex eb3a584d3..560629316 100644--- a/tests/metagpt/strategy/prompt_templates/creative_writing.py+++ b/tests/metagpt/strategy/prompt_templates/creative_writing.py@@ -5,13 +5,13 @@ Write a coherent passage of 4 short paragraphs. The end sentence of each paragracot_prompt = """Write a coherent passage of 4 short paragraphs. The end sentence of each paragraph must be: {input}-Make a plan then write. Your output should be of the following format:+Make a plan then write. Your output should be like:Plan:-Your plan here.+<Your plan here with json format>Passage:-Your passage here.+<Your passage here with json format>"""