mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
make tot follow format in 3.5-turbo
This commit is contained in:
parent
c07cf543bf
commit
99e10b235b
3 changed files with 5 additions and 5 deletions
|
|
@ -17,7 +17,7 @@ from metagpt.strategy.tot_schema import MethodSelect, Strategy, ThoughtSolverCon
|
|||
from metagpt.utils.common import CodeParser
|
||||
|
||||
OUTPUT_FORMAT = """
|
||||
Output a list of jsons following the format:
|
||||
Each output should be strictly a list of nodes, in json format, like this:
|
||||
```json
|
||||
[
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ Write a coherent passage of 4 short paragraphs. The end sentence of each paragra
|
|||
cot_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>
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue