🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
Merge branch 'dev_tool_selection' of https://gitlab.deepwisdomai.com/agents/data_agents_opt into dev_tool_selection
stellahsr7e164eecb375
diff --cc metagpt/actions/write_code_steps.pyindex 6bf223701,a19549b71..889c06679--- a/metagpt/actions/write_code_steps.py+++ b/metagpt/actions/write_code_steps.py@@@ -63,18 -63,15 +63,18 @@@ class WriteCodeSteps(Action)def get_context(self, plan: Plan):user_requirement = plan.goal- # select_task_keys = ['task_id', 'instruction', 'is_finished', 'code']- select_task_keys = ['task_id','code']+ select_task_keys = ['task_id', 'instruction', 'is_finished', 'code']-++ # select_task_keys = ['task_id','code']+def process_task(task):task_dict = task.dict()- ptask = {k: task_dict[k] for k in task_dict if k in select_task_keys}+ ptask = {k: task_dict[k] for k in task_dict if k in select_task_keys }return ptask+tasks = json.dumps(- [process_task(task) for task in plan.tasks if task.is_finished==True], indent=4, ensure_ascii=False+ [process_task(task) for task in plan.tasks], indent=4, ensure_ascii=False)+current_task = json.dumps(process_task(plan.current_task)) if plan.current_task else {}context = STRUCTURAL_CONTEXT.format(user_requirement=user_requirement, tasks=tasks, current_task=current_task