Spaces:
Sleeping
Sleeping
Zanqi commited on
Commit ·
a86cab3
1
Parent(s): de41b93
Fix final_answer assignment in stream_to_gradio to correctly reference step_log's final_answer attribute
Browse files- Gradio_UI.py +2 -2
Gradio_UI.py
CHANGED
|
@@ -153,8 +153,8 @@ def stream_to_gradio(
|
|
| 153 |
):
|
| 154 |
yield message
|
| 155 |
|
| 156 |
-
final_answer = step_log # Last log is the run's final_answer
|
| 157 |
-
final_answer = handle_agent_output_types(final_answer)
|
| 158 |
|
| 159 |
if isinstance(final_answer, AgentText):
|
| 160 |
print("I am an AgentText")
|
|
|
|
| 153 |
):
|
| 154 |
yield message
|
| 155 |
|
| 156 |
+
final_answer = step_log.final_answer # Last log is the run's final_answer
|
| 157 |
+
# final_answer = handle_agent_output_types(final_answer)
|
| 158 |
|
| 159 |
if isinstance(final_answer, AgentText):
|
| 160 |
print("I am an AgentText")
|