mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-02 14:45:17 +02:00
fixbug: 统一了接口
This commit is contained in:
parent
444b609e38
commit
3b0f76a1cd
2 changed files with 4 additions and 2 deletions
|
|
@ -135,7 +135,8 @@ class WriteDesign(Action):
|
|||
self._save_prd(docs_path, resources_path, context[-1].content)
|
||||
self._save_system_design(docs_path, resources_path, content)
|
||||
|
||||
async def run(self, context):
|
||||
async def run(self, *args, **kwargs):
|
||||
context = args[0]
|
||||
prompt = PROMPT_TEMPLATE.format(context=context, format_example=FORMAT_EXAMPLE)
|
||||
# system_design = await self._aask(prompt)
|
||||
system_design = await self._aask_v1(prompt, "system_design", OUTPUT_MAPPING)
|
||||
|
|
|
|||
|
|
@ -115,7 +115,8 @@ class WriteTasks(Action):
|
|||
requirements_path = WORKSPACE_ROOT / ws_name / 'requirements.txt'
|
||||
requirements_path.write_text(rsp.instruct_content.dict().get("Required Python third-party packages").strip('"\n'))
|
||||
|
||||
async def run(self, context):
|
||||
async def run(self, *args, **kwargs):
|
||||
context = args[0]
|
||||
prompt = PROMPT_TEMPLATE.format(context=context, format_example=FORMAT_EXAMPLE)
|
||||
rsp = await self._aask_v1(prompt, "task", OUTPUT_MAPPING)
|
||||
self._save(context, rsp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue