Jekaterina commited on
Commit
ca0a101
·
verified ·
1 Parent(s): e8a6359

Update Gradio_UI.py

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +3 -1
Gradio_UI.py CHANGED
@@ -31,10 +31,12 @@ def pull_messages_from_step(
31
  """Extract ChatMessage objects from agent steps with proper nesting"""
32
  import gradio as gr
33
 
34
- yield gr.ChatMessage(role="assistant", content=f"***Thinking***")
35
  if isinstance(step_log, ActionStep):
36
  # Output the step number
37
  step_number = f"Step {step_log.step_number}" if step_log.step_number is not None else ""
 
 
38
  yield gr.ChatMessage(role="assistant", content=f"**{step_number}**")
39
 
40
  # First yield the thought/reasoning from the LLM
 
31
  """Extract ChatMessage objects from agent steps with proper nesting"""
32
  import gradio as gr
33
 
34
+
35
  if isinstance(step_log, ActionStep):
36
  # Output the step number
37
  step_number = f"Step {step_log.step_number}" if step_log.step_number is not None else ""
38
+ if step_log.step_number == 1:
39
+ yield gr.ChatMessage(role="assistant", content=f"***Thinking***")
40
  yield gr.ChatMessage(role="assistant", content=f"**{step_number}**")
41
 
42
  # First yield the thought/reasoning from the LLM