[FIX] Update parameter name from 'llm' to 'model_name' in Agent instantiation across tests

pull/948/head
harshalmore31 2 months ago
parent f3e26623ae
commit 95e544c10b

@ -137,7 +137,7 @@ def test_tool_execution_with_agent():
agent = Agent( agent = Agent(
agent_name="CalculatorAgent", agent_name="CalculatorAgent",
system_prompt="You are an agent that uses a calculator tool.", system_prompt="You are an agent that uses a calculator tool.",
llm="gpt-4o", model_name="gpt-4o",
max_loops=1, max_loops=1,
tools=[simple_calculator], tools=[simple_calculator],
output_type="str-all-except-first" output_type="str-all-except-first"
@ -157,7 +157,7 @@ def test_multimodal_execution():
agent = Agent( agent = Agent(
agent_name="VisionAgent", agent_name="VisionAgent",
system_prompt="You are an agent that describes images.", system_prompt="You are an agent that describes images.",
llm="gpt-4o", model_name="gpt-4o",
max_loops=1, max_loops=1,
multi_modal=True multi_modal=True
) )
@ -175,7 +175,7 @@ def test_multiple_image_execution():
agent = Agent( agent = Agent(
agent_name="MultiVisionAgent", agent_name="MultiVisionAgent",
system_prompt="You are an agent that describes multiple images.", system_prompt="You are an agent that describes multiple images.",
llm="gpt-4o", model_name="gpt-4o",
max_loops=1, max_loops=1,
multi_modal=True multi_modal=True
) )
@ -191,8 +191,8 @@ def test_multiple_image_execution():
def test_concurrent_workflow(): def test_concurrent_workflow():
"""Tests the ConcurrentWorkflow with multiple agents.""" """Tests the ConcurrentWorkflow with multiple agents."""
agents = [ agents = [
Agent(agent_name="Agent1", llm="gpt-4o", max_loops=1), Agent(agent_name="Agent1", model_name="gpt-4o", max_loops=1),
Agent(agent_name="Agent2", llm="gpt-4o", max_loops=1) Agent(agent_name="Agent2", model_name="gpt-4o", max_loops=1)
] ]
workflow = ConcurrentWorkflow(agents=agents, max_loops=1) workflow = ConcurrentWorkflow(agents=agents, max_loops=1)
@ -205,8 +205,8 @@ def test_concurrent_workflow():
def test_sequential_workflow(): def test_sequential_workflow():
"""Tests the SequentialWorkflow with multiple agents.""" """Tests the SequentialWorkflow with multiple agents."""
agents = [ agents = [
Agent(agent_name="Agent1", system_prompt="Generate a famous quote.", llm="gpt-4o", max_loops=1), Agent(agent_name="Agent1", system_prompt="Generate a famous quote.", model_name="gpt-4o", max_loops=1),
Agent(agent_name="Agent2", system_prompt="Explain the meaning of the provided quote.", llm="gpt-4o", max_loops=1) Agent(agent_name="Agent2", system_prompt="Explain the meaning of the provided quote.", model_name="gpt-4o", max_loops=1)
] ]
workflow = SequentialWorkflow(agents=agents, max_loops=1, output_type="final") workflow = SequentialWorkflow(agents=agents, max_loops=1, output_type="final")
@ -219,12 +219,12 @@ def test_sequential_workflow():
def test_streaming_and_non_streaming(): def test_streaming_and_non_streaming():
"""Tests both streaming and non-streaming modes.""" """Tests both streaming and non-streaming modes."""
# Non-streaming # Non-streaming
non_streaming_agent = Agent(agent_name="NonStreamer", llm="gpt-4o", max_loops=1, streaming_on=False) non_streaming_agent = Agent(agent_name="NonStreamer", model_name="gpt-4o", max_loops=1, streaming_on=False)
non_streaming_response = non_streaming_agent.run("Tell me a short story.") non_streaming_response = non_streaming_agent.run("Tell me a short story.")
assert isinstance(non_streaming_response, str) assert isinstance(non_streaming_response, str)
# Streaming # Streaming
streaming_agent = Agent(agent_name="Streamer", llm="gpt-4o", max_loops=1, streaming_on=True) streaming_agent = Agent(agent_name="Streamer", model_name="gpt-4o", max_loops=1, streaming_on=True)
streaming_response_generator = streaming_agent.run("Tell me a short story.") streaming_response_generator = streaming_agent.run("Tell me a short story.")
full_response = "" full_response = ""

Loading…
Cancel
Save