Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions examples/smolagents_benchmark/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def answer_single_question(example, model, answers_file, action_type):
agent = ToolCallingAgent(
tools=[GoogleSearchTool(provider="serper"), VisitWebpageTool(), PythonInterpreterTool()],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the default tools be changed so that there is an apples-apples comparison between the ToolCallingAgent and CodeAgent?
Maybe pass the bellow additional_authorized_imports to the PythonInterpreterTool initialization

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes indeed, we should pass the same additional_authorized_imports to PythonInterpreterTool to make it really an even comparison!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let ou do the change before merging

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

model=model,
additional_authorized_imports=["numpy", "sympy"],
max_steps=10,
)

Expand All @@ -158,7 +157,7 @@ def answer_single_question(example, model, answers_file, action_type):
# Run agent 🚀
answer = str(agent.run(augmented_question))
token_counts = agent.monitor.get_total_token_counts()
intermediate_steps = [dict(message) for message in agent.write_memory_to_messages()]
intermediate_steps = [message.dict() for message in agent.write_memory_to_messages()]

end_time = time.time()
except Exception as e:
Expand Down