refine code

This commit is contained in:
geekan 2023-12-25 23:13:17 +08:00
parent a903cfa8ef
commit d577597ede
4 changed files with 19 additions and 5 deletions

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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"