mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-15 11:02:36 +02:00
Merge branch 'ci_debugcode_modify' into 'code_intepreter'
1. merge run and run_reflection; 2. remove useless code See merge request agents/data_agents_opt!74
This commit is contained in:
commit
a74afd6b16
2 changed files with 22 additions and 36 deletions
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import pytest
|
||||
|
||||
from metagpt.actions.debug_code import DebugCode, messages_to_str
|
||||
from metagpt.actions.debug_code import DebugCode
|
||||
from metagpt.schema import Message
|
||||
|
||||
ErrorStr = """Tested passed:
|
||||
|
|
@ -49,9 +49,3 @@ async def test_debug_code():
|
|||
debug_context = Message(content=DebugContext)
|
||||
new_code = await DebugCode().run(context=debug_context, code=CODE, runtime_result=ErrorStr)
|
||||
assert "def sort_array(arr)" in new_code["code"]
|
||||
|
||||
|
||||
def test_messages_to_str():
|
||||
debug_context = Message(content=DebugContext)
|
||||
msg_str = messages_to_str([debug_context])
|
||||
assert "user: Solve the problem in Python" in msg_str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue