mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-05 05:42:37 +02:00
Merge branch 'fixbug/mgx_ops' into 'mgx_ops'
AttributeError: 'NoneType' object has no attribute 'sop' See merge request pub/MetaGPT!22
This commit is contained in:
commit
ae343aee55
2 changed files with 3 additions and 2 deletions
|
|
@ -98,7 +98,8 @@ class DetectIntent(Action):
|
|||
sop_type = await self._aask(prompt)
|
||||
sop_type = sop_type.strip()
|
||||
|
||||
sop = SOPItem.get_type(sop_type).sop
|
||||
item = SOPItem.get_type(sop_type)
|
||||
sop = item.sop if item else None
|
||||
|
||||
req_with_sop = (
|
||||
REQ_WITH_SOP.format(user_requirement=user_requirement, sop="\n".join(sop)) if sop else user_requirement
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ async def write_prd(idea: str, project_path: Optional[str | Path] = None) -> Pat
|
|||
from metagpt.roles import ProductManager
|
||||
|
||||
ctx = Context()
|
||||
if project_path:
|
||||
if project_path and Path(project_path).exists():
|
||||
ctx.config.project_path = Path(project_path)
|
||||
ctx.config.inc = True
|
||||
role = ProductManager(context=ctx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue