florentgbelidji HF staff commited on
Commit
4a03688
Β·
1 Parent(s): 73583af

Changed thinking streaming

Browse files
Files changed (1) hide show
  1. src/gradio_utils.py +2 -2
src/gradio_utils.py CHANGED
@@ -105,7 +105,7 @@ def pull_messages_from_step(step_log, test_mode: bool = True):
105
  if step_log.observations is not None:
106
  yield step_log.observations
107
  if step_log.error is not None:
108
- yield f"####Error πŸ’₯πŸ’₯:\n ```{str(step_log.error)}```"
109
 
110
 
111
  # Simplified interaction function
@@ -149,7 +149,7 @@ def stream_to_gradio(
149
 
150
 
151
  accumulated_thoughts += f"{agent_thought}\n\n"
152
- message = gr.ChatMessage(role="assistant", metadata={"title": "πŸ€”πŸ’­πŸ”„"}, content=str( accumulated_thoughts))
153
  yield (message, df_routes, gr.Markdown(value=FINAL_MESSAGE_HEADER , container=True))
154
 
155
  final_answer = step_log # Last log is the run's final_answer
 
105
  if step_log.observations is not None:
106
  yield step_log.observations
107
  if step_log.error is not None:
108
+ yield f"###Error πŸ’₯πŸ’₯:\n ```{str(step_log.error)}```"
109
 
110
 
111
  # Simplified interaction function
 
149
 
150
 
151
  accumulated_thoughts += f"{agent_thought}\n\n"
152
+ message = gr.ChatMessage(role="assistant", metadata={"title": "πŸ€”πŸ’­πŸ”„"}, content=str(accumulated_thoughts))
153
  yield (message, df_routes, gr.Markdown(value=FINAL_MESSAGE_HEADER , container=True))
154
 
155
  final_answer = step_log # Last log is the run's final_answer