chore: rename WriteCode -> WriteCodeFunction.

This commit is contained in:
刘棒棒 2023-11-21 19:15:16 +08:00
parent 50f64ca934
commit fa400a0b0d
3 changed files with 5 additions and 5 deletions

View file

@ -1,11 +1,11 @@
import pytest
from metagpt.actions.write_code_v2 import WriteCode
from metagpt.actions.write_code_function import WriteCodeFunction
@pytest.mark.asyncio
async def test_write_code():
coder = WriteCode()
coder = WriteCodeFunction()
code = await coder.run("Write a hello world code.")
assert "language" in code.content
assert "code" in code.content
@ -14,7 +14,7 @@ async def test_write_code():
@pytest.mark.asyncio
async def test_write_code_by_list_prompt():
coder = WriteCode()
coder = WriteCodeFunction()
msg = ["a=[1,2,5,10,-10]", "写出求a中最大值的代码python"]
code = await coder.run(msg)
assert "language" in code.content