Enable return_full_result directly in run method by aymeric-roucher · Pull Request #1658 · huggingface/smolagents (original) (raw)
Thanks, this is a sensible enhancement: I agree that return_full_result is often run-specific and it makes sense to support it directly in the run() method.
Just a couple of observations:
- Precedence: I think the explicit
return_full_resultargument passed torun()should take precedence over the agent-levelself.return_full_result. This allows users to override the default behavior in a specific call without modifying the agent itself. - Use of
orlogic: The current logicself.return_full_result or return_full_resultunfortunately doesn't enforce the intended precedence. If either value is True, it evaluates to True, regardless of whether the caller passed False.