Skip to content

Commit

Permalink
Use different react langchain agent in tests for speed
Browse files Browse the repository at this point in the history
  • Loading branch information
whimo committed May 23, 2024
1 parent 5fee363 commit 601d23e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions tests/test_agents/test_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from langchain_community.tools import DuckDuckGoSearchRun
from motleycrew.agents.crewai.crewai_agent import CrewAIMotleyAgent
from motleycrew.agents.langchain.react import ReactMotleyAgent
from motleycrew.agents.langchain.openai_tools_react import ReactOpenAIToolsAgent
from motleycrew.agents.llama_index.llama_index_react import ReActLlamaIndexMotleyAgent
from motleycrew.common.exceptions import AgentNotMaterialized, CannotModifyMaterializedAgent
from motleycrew.tools.python_repl import create_repl_tool
Expand Down Expand Up @@ -32,11 +32,8 @@ def crewai_agent(self):

@pytest.fixture(scope="class")
def langchain_agent(self):
agent = ReactMotleyAgent(
agent = ReactOpenAIToolsAgent(
name="AI writer agent",
description="""Conduct a comprehensive analysis of the latest advancements in AI in 2024.
Identify key trends, breakthrough technologies, and potential industry impacts.
Your final answer MUST be a full analysis report""",
tools=[DuckDuckGoSearchRun()],
verbose=True,
)
Expand Down
7 changes: 2 additions & 5 deletions tests/test_tasks/test_simple_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from langchain_community.tools import DuckDuckGoSearchRun
from motleycrew.crew import MotleyCrew
from motleycrew.agents.langchain import ReactMotleyAgent
from motleycrew.agents.langchain.openai_tools_react import ReactOpenAIToolsAgent
from motleycrew.tasks.simple import (
SimpleTask,
SimpleTaskUnit,
Expand All @@ -18,11 +18,8 @@ def crew(self):

@pytest.fixture(scope="class")
def agent(self):
agent = ReactMotleyAgent(
agent = ReactOpenAIToolsAgent(
name="AI writer agent",
description="""Conduct a comprehensive analysis of the latest advancements in AI in 2024.
Identify key trends, breakthrough technologies, and potential industry impacts.
Your final answer MUST be a full analysis report""",
tools=[DuckDuckGoSearchRun()],
verbose=True,
)
Expand Down

0 comments on commit 601d23e

Please sign in to comment.