mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-07 06:42:38 +02:00
按照要求修改
This commit is contained in:
parent
e2af76fb08
commit
f3c7da32a0
41 changed files with 342 additions and 944 deletions
|
|
@ -22,7 +22,7 @@ class Action(ABC):
|
|||
def __init__(self, name: str = "", context=None, llm: LLM = None):
|
||||
self.name: str = name
|
||||
if llm is None:
|
||||
llm=LLM.DEFAULT_LLM
|
||||
llm = LLM()
|
||||
self.llm = llm
|
||||
self.context = context
|
||||
self.prefix = ""
|
||||
|
|
|
|||
|
|
@ -207,5 +207,11 @@ class WriteDesign(Action):
|
|||
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, format=format)
|
||||
# fix Python package name, we can't system_design.instruct_content.python_package_name = "xxx" since "Python package name" contain space, have to use setattr
|
||||
setattr(
|
||||
system_design.instruct_content,
|
||||
"Python package name",
|
||||
system_design.instruct_content.dict()["Python package name"].strip().strip("'").strip('"'),
|
||||
)
|
||||
await self._save(context, system_design)
|
||||
return system_design
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue