florentgbelidji HF staff commited on
Commit
c9c133f
·
1 Parent(s): f113b19

Changed thinking streaming

Browse files
Files changed (1) hide show
  1. src/gradio_utils.py +2 -2
src/gradio_utils.py CHANGED
@@ -5,7 +5,7 @@ import pandas as pd
5
  from gradio_folium import Folium
6
  #from smolagents.gradio_ui import pull_messages_from_step
7
  from smolagents.types import handle_agent_output_types, AgentText
8
- from smolagents import AgentStepLog, ActionStep
9
  from folium import Map, TileLayer, Marker, Icon, Popup
10
  from folium.plugins import Fullscreen
11
 
@@ -90,7 +90,7 @@ def update_map_on_selection(row: pd.Series, df_routes: gr.State) -> Map:
90
 
91
  return f_map
92
 
93
- def pull_messages_from_step(step_log: AgentStepLog, test_mode: bool = True):
94
  """Extract ChatMessage objects from agent steps"""
95
  if isinstance(step_log, ActionStep):
96
  yield gr.ChatMessage(role="assistant", content=step_log.llm_output or "", metadata={"title": "🤔💭🔄"},)
 
5
  from gradio_folium import Folium
6
  #from smolagents.gradio_ui import pull_messages_from_step
7
  from smolagents.types import handle_agent_output_types, AgentText
8
+ from smolagents.agents import ActionStep
9
  from folium import Map, TileLayer, Marker, Icon, Popup
10
  from folium.plugins import Fullscreen
11
 
 
90
 
91
  return f_map
92
 
93
+ def pull_messages_from_step(step_log, test_mode: bool = True):
94
  """Extract ChatMessage objects from agent steps"""
95
  if isinstance(step_log, ActionStep):
96
  yield gr.ChatMessage(role="assistant", content=step_log.llm_output or "", metadata={"title": "🤔💭🔄"},)