Skip to content

Fix no more tool calls exception in ToolCallingAgent #1117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fhkong
Copy link

@fhkong fhkong commented Apr 1, 2025

When the ToolCallingAgent doesn't return any toolcall after executing a step, it should trigger provide_final_answer function to provide the final answer and stop iteration. However, the current logic doesn't implement this behavior. This PR aims to fix this issue.

@aymeric-roucher
Copy link
Collaborator

For me it's good to raise an error as we do if no tool call is found: that means the model has just made an error, so the agent should keep running and give a new output without an error (i.e. with a proper tool call).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants