Support multiple callbacks per step type in step_callbacks dict by albertvillanova · Pull Request #1517 · huggingface/smolagents (original) (raw)
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.