Spaces:
Sleeping
Sleeping
File size: 1,272 Bytes
98cb5d3 28be273 98cb5d3 28be273 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | from smolagents import CodeAgent, HfApiModel, LiteLLMModel, InferenceClientModel
from tools import duck_search_tool, visit_web_page_tool
# Initialize the model for agent_1
model_1 = HfApiModel(
"Qwen/Qwen2.5-Coder-32B-Instruct", provider="together", max_tokens=8096
)
web_agent_1 = CodeAgent(
model=model_1,
tools=[
duck_search_tool,
visit_web_page_tool,
],
name="web_agent_1",
description="Searches the web and retrieve relevant information about the question asked",
verbosity_level=0,
max_steps=10,
)
model_2 = InferenceClientModel(model_id= "meta-llama/Llama-3.3-70B-Instruct")
web_agent_2 = CodeAgent(
model=model_2,
tools=[
duck_search_tool,
visit_web_page_tool,
],
name="web_agent_2",
description="Searches the web and retrieve relevant information about the question asked",
verbosity_level=0,
max_steps=10,
)
model_3 = LiteLLMModel(model_id="anthropic/claude-3-5-sonnet-latest")
web_agent_3 = CodeAgent(
model=model_3,
tools=[
duck_search_tool,
visit_web_page_tool,
],
name="web_agent_3",
description="Searches the web and retrieve relevant information about the question asked",
verbosity_level=0,
max_steps=10,
) |