Skip to content

Commit

Permalink
Merge pull request geekan#1435 from hgftrdw45ud67is8o89/main
Browse files Browse the repository at this point in the history
Fix bug geekan#1430 and also make some field in design api optional.
  • Loading branch information
iorisa authored Aug 5, 2024
2 parents 5446c7e + a3eaa02 commit ec2c1dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions metagpt/actions/design_api_an.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@Author : alexanderwu
@File : design_api_an.py
"""
from typing import List
from typing import List,Optional

from metagpt.actions.action_node import ActionNode
from metagpt.utils.mermaid import MMC1, MMC2
Expand Down Expand Up @@ -45,9 +45,10 @@
example=["main.py", "game.py", "new_feature.py"],
)

#optional,because low success reproduction of class diagram in non py project.
DATA_STRUCTURES_AND_INTERFACES = ActionNode(
key="Data structures and interfaces",
expected_type=str,
expected_type=Optional[str],
instruction="Use mermaid classDiagram code syntax, including classes, method(__init__ etc.) and functions with type"
" annotations, CLEARLY MARK the RELATIONSHIPS between classes, and comply with PEP8 standards. "
"The data structures SHOULD BE VERY DETAILED and the API should be comprehensive with a complete design.",
Expand All @@ -66,7 +67,7 @@

PROGRAM_CALL_FLOW = ActionNode(
key="Program call flow",
expected_type=str,
expected_type=Optional[str],
instruction="Use sequenceDiagram code syntax, COMPLETE and VERY DETAILED, using CLASSES AND API DEFINED ABOVE "
"accurately, covering the CRUD AND INIT of each object, SYNTAX MUST BE CORRECT.",
example=MMC2,
Expand Down
4 changes: 2 additions & 2 deletions metagpt/actions/project_management_an.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
@Author : alexanderwu
@File : project_management_an.py
"""
from typing import List
from typing import List, Optional

from metagpt.actions.action_node import ActionNode

REQUIRED_PACKAGES = ActionNode(
key="Required packages",
expected_type=List[str],
expected_type=Optional[List[str]],
instruction="Provide required packages in requirements.txt format.",
example=["flask==1.1.2", "bcrypt==3.2.0"],
)
Expand Down

0 comments on commit ec2c1dc

Please sign in to comment.