Spaces:
Runtime error
Runtime error
File size: 481 Bytes
a9987d3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Create a CodeAgent with DuckDuckGo search capability
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel
web_search = DuckDuckGoSearchTool()
model = HfApiModel(
max_tokens=2096,
temperature=0.5,
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
custom_role_conversions=None,
)
agent = CodeAgent(
tools=[web_search], # Add search tool here
model=model # Add model here
)
|