mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-15 11:02:36 +02:00
update failed examples
This commit is contained in:
parent
30a78a9249
commit
c64dee43e9
3 changed files with 6 additions and 28 deletions
|
|
@ -65,10 +65,14 @@ def update_plan_from_rsp(rsp: str, current_plan: Plan):
|
|||
# handle a single task
|
||||
if current_plan.has_task_id(tasks[0].task_id):
|
||||
# replace an existing task
|
||||
current_plan.replace_task(tasks[0])
|
||||
current_plan.replace_task(
|
||||
tasks[0].task_id, tasks[0].dependent_task_ids, tasks[0].instruction, tasks[0].assignee
|
||||
)
|
||||
else:
|
||||
# append one task
|
||||
current_plan.append_task(tasks[0])
|
||||
current_plan.append_task(
|
||||
tasks[0].task_id, tasks[0].dependent_task_ids, tasks[0].instruction, tasks[0].assignee
|
||||
)
|
||||
|
||||
else:
|
||||
# add tasks in general
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue