Spaces:
Build error
Build error
Update Gradio_UI.py
Browse files- Gradio_UI.py +3 -3
Gradio_UI.py
CHANGED
@@ -145,9 +145,9 @@ def stream_to_gradio(
|
|
145 |
if agent.model.last_input_token_count:
|
146 |
total_input_tokens += agent.model.last_input_token_count
|
147 |
total_output_tokens += agent.model.last_output_token_count
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
|
152 |
for message in pull_messages_from_step(
|
153 |
step_log,
|
|
|
145 |
if agent.model.last_input_token_count:
|
146 |
total_input_tokens += agent.model.last_input_token_count
|
147 |
total_output_tokens += agent.model.last_output_token_count
|
148 |
+
if isinstance(step_log, ActionStep):
|
149 |
+
step_log.input_token_count = agent.model.last_input_token_count
|
150 |
+
step_log.output_token_count = agent.model.last_output_token_count
|
151 |
|
152 |
for message in pull_messages_from_step(
|
153 |
step_log,
|