mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-10-31 02:37:57 +08:00
refine code
This commit is contained in:
@@ -19,5 +19,5 @@ class ExecuteTask(Action):
|
||||
context: list[Message] = []
|
||||
llm: BaseGPTAPI = Field(default_factory=LLM)
|
||||
|
||||
def run(self, *args, **kwargs):
|
||||
async def run(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
@@ -11,6 +11,3 @@ class FixBug(Action):
|
||||
"""Fix bug action without any implementation details"""
|
||||
|
||||
name: str = "FixBug"
|
||||
|
||||
async def run(self, *args, **kwargs):
|
||||
raise NotImplementedError
|
||||
|
||||
@@ -26,7 +26,7 @@ API列表:
|
||||
"""
|
||||
_ = "API设计看起来非常合理,满足了PRD中的所有需求。"
|
||||
|
||||
design_api_review = DesignReview("design_api_review")
|
||||
design_api_review = DesignReview()
|
||||
|
||||
result = await design_api_review.run(prd, api_design)
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@Time : 2023/12/25 22:38
|
||||
@Author : alexanderwu
|
||||
@File : test_fix_bug.py
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from metagpt.actions.fix_bug import FixBug
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_fix_bug():
|
||||
fix_bug = FixBug()
|
||||
assert fix_bug.name == "FixBug"
|
||||
Reference in New Issue
Block a user