Spaces:
Sleeping
Sleeping
Update Gradio_UI.py
Browse files154 unmodified lines155156157158159160161162163164165154 unmodified linesfinal_step = step_log # this is the final ActionStepfinal_output = getattr(final_step, "tool_output", None)# ✅ Fallback if tool_output is None and a final_answer tool was calledif final_output is None and hasattr(final_step, "tool_calls") and final_step.tool_calls:if final_step.tool_calls[0].name == "final_answer":final_output = final_step.tool_calls[0].arguments.get("answer", None)final_output = handle_agent_output_types(final_output)154 unmodified lines155156157158159160161162163164165166167168154 unmodified linesfinal_step = step_log # this is the final ActionStepfinal_output = getattr(final_step, "tool_output", None)# If no tool_output, fallback to first final_answer callif not final_output and final_step.tool_calls:for call in final_step.tool_calls:if call.name == "final_answer":final_output = call.arguments.get("answer")breakfinal_output = handle_agent_output_types(final_output)
Gradio_UI.py+7-4