-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the bug
final_answer_checks are being called after every action step instead of just final_answer_step
When final_answer_checks is not none, the agent run would fail with Check check_final_answer failed with error: None is not of type 'object'
Looking at the log, it is running the check_final_answer before final_answer step.
Code to reproduce the error
create any agent that has final_answer_checks
Error logs (if any)
Check check_final_answer failed with error: None is not of type 'object'
Expected behavior
should only run check_final_answer when there is a final_answer
Packages version:
version = "1.18.0"
Additional context
It is introduced by this change.
when token streaming is not enabled, _step_stream always returns a FinalOutput. when it is not final answer, it is a FinalOutput(output=None)