mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-15 11:02:36 +02:00
add test
This commit is contained in:
parent
664710e6e8
commit
cbfc62d7f3
3 changed files with 3 additions and 3 deletions
|
|
@ -35,4 +35,4 @@ async def test_action_planner():
|
|||
role.recv(Message(content=task, cause_by=BossRequirement))
|
||||
|
||||
await role._think() # it will choose mathskill.Add
|
||||
assert "1100" == (await role._act()).content.result
|
||||
assert "1100" == (await role._act()).content
|
||||
|
|
|
|||
|
|
@ -39,4 +39,4 @@ async def test_basic_planner():
|
|||
# assuming sk_agent will think he needs WriterSkill.Brainstorm and WriterSkill.Translate
|
||||
assert "WriterSkill.Brainstorm" in role.plan.generated_plan.result
|
||||
assert "WriterSkill.Translate" in role.plan.generated_plan.result
|
||||
await role._act()
|
||||
# assert "SALUT" in (await role._act()).content #content will be some French
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class SkAgent(Role):
|
|||
if isinstance(self.planner, BasicPlanner):
|
||||
result = await self.planner.execute_plan_async(self.plan, self.kernel)
|
||||
elif any(isinstance(self.planner, cls) for cls in [SequentialPlanner, ActionPlanner]):
|
||||
result = await self.plan.invoke_async()
|
||||
result = (await self.plan.invoke_async()).result
|
||||
logger.info(result)
|
||||
|
||||
msg = Message(content=result, role=self.profile, cause_by=type(self._rc.todo))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue