mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-17 15:35:21 +02:00
更新需要测试Agent类
This commit is contained in:
parent
d79ed767e2
commit
1ec2b922c1
1 changed files with 25 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
import pytest
|
||||
from examples.st_game.roles.st_role import STRole
|
||||
from examples.st_game.actions.run_reflect_action import AgentFocusPt
|
||||
from examples.st_game.actions.run_reflect_action import AgentFocusPt, AgentInsightAndGuidance, AgentEventTriple, AgentEventPoignancy, AgentChatPoignancy, AgentPlanThoughtOnConvo, AgentMemoryOnConvo
|
||||
from metagpt.logs import logger
|
||||
|
||||
|
||||
|
|
@ -14,14 +14,36 @@ class TestReflectFunction:
|
|||
logger.info(f"记忆长度为{len(role.memory.storage)}")
|
||||
return role
|
||||
|
||||
def test_fuction_point_action(self,init_agent):
|
||||
def test_function_focus_and_insight_action(self,init_agent):
|
||||
"""
|
||||
|
||||
单个Action测试样例
|
||||
"""
|
||||
run_focus = AgentFocusPt()
|
||||
statements = "" # 这个statements 与 n 设置是遵循reflect里面实际设置# 来的,你写的时候可以对应代码看一下
|
||||
run_focus.run(init_agent, statements, n=3)
|
||||
|
||||
run_insight = AgentInsightAndGuidance()
|
||||
# 这里主要需要查看,Looger.info(filling)
|
||||
# 完善代码
|
||||
|
||||
def test_event_triple_action(self,init_agent):
|
||||
"""
|
||||
测试tripleAgent Action
|
||||
"""
|
||||
pass
|
||||
|
||||
def test_poignancy_action(self,init_agent):
|
||||
"""
|
||||
测试两个关于poignancy的Action
|
||||
"""
|
||||
pass
|
||||
|
||||
def test_convo_action(self,init_agent):
|
||||
"""
|
||||
测试两个convo相关的类
|
||||
"""
|
||||
pass
|
||||
|
||||
# 测试全部Reflection功能
|
||||
def test_reflect_function(self, init_agent):
|
||||
# 修改 近期 importace 确保Reflect机制能够触发
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue