Co-authored-by: Touseef Ahmad <touseefahmed9669@gmail.com> Co-authored-by: Parteek <parteekkamboj112@gmail.com> Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Co-authored-by: sysradium <sysradium@users.noreply.github.com>
12 lines
564 B
Python
12 lines
564 B
Python
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel
|
|
|
|
|
|
model = HfApiModel()
|
|
|
|
agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=model, executor_type="docker")
|
|
output = agent.run("How many seconds would it take for a leopard at full speed to run through Pont des Arts?")
|
|
print("Docker executor result:", output)
|
|
|
|
agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=model, executor_type="e2b")
|
|
output = agent.run("How many seconds would it take for a leopard at full speed to run through Pont des Arts?")
|
|
print("E2B executor result:", output)
|