Skip to content

Support multiple callbacks per step type in step_callbacks dict #1517

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

Merged

Conversation

albertvillanova
Copy link
Member

Support multiple callbacks per step type in step_callbacks dict.

This PR enhances the step_callbacks parameter in MultiStepAgent to support registering multiple callbacks for the same step type when using the dictionary format.

Note:

  • Previously, the dictionary format only supported mapping each step type to a single callback function.
  • Now users can specify multiple callbacks for the same step type by passing a list.
  • Maintains full backward compatibility with existing code.

Copy link
Collaborator

@aymeric-roucher aymeric-roucher left a comment

Choose a reason for hiding this comment

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

Thank you @albertvillanova !

@albertvillanova albertvillanova merged commit 503dece into huggingface:main Jul 3, 2025
3 checks passed
@albertvillanova albertvillanova deleted the fix-callbacks-dict branch July 3, 2025 13:03
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