mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-02 14:45:17 +02:00
allow new instruction even if there's no insights
This commit is contained in:
parent
6d40ec463f
commit
376d1b7661
1 changed files with 6 additions and 2 deletions
|
|
@ -85,8 +85,12 @@ class InstructionGenerator:
|
|||
if len(data) == 0:
|
||||
mcts_logger.log("MCTS", f"No insights available for task {task_id}")
|
||||
return [original_instruction] # Return the original instruction if no insights are available
|
||||
for item in data[:max_num]:
|
||||
insights = item["Analysis"]
|
||||
for i in range(max_num):
|
||||
if len(data) == 0:
|
||||
insights = "No insights available"
|
||||
else:
|
||||
item = data[i]
|
||||
insights = item["Analysis"]
|
||||
new_instruction = await InstructionGenerator.generate_new_instruction(original_instruction, insights)
|
||||
new_instructions.append(new_instruction)
|
||||
return new_instructions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue