Spaces:
Sleeping
Sleeping
Update Gradio_UI.py
Browse files141 unmodified lines142143144145146147148149141 unmodified linesfor step_log in agent.run(task, stream=True, reset=reset_agent_memory, additional_args=additional_args):# Track tokens if model provides themif hasattr(agent.model, "last_input_token_count"):total_input_tokens += agent.model.last_input_token_counttotal_output_tokens += agent.model.last_output_token_countif isinstance(step_log, ActionStep):step_log.input_token_count = agent.model.last_input_token_countstep_log.output_token_count = agent.model.last_output_token_count141 unmodified lines142143144145146147148149141 unmodified linesfor step_log in agent.run(task, stream=True, reset=reset_agent_memory, additional_args=additional_args):# Track tokens if model provides themif hasattr(agent.model, "last_input_token_count"):total_input_tokens += agent.model.last_input_token_count or 0total_output_tokens += agent.model.last_output_token_count or 0if isinstance(step_log, ActionStep):step_log.input_token_count = agent.model.last_input_token_countstep_log.output_token_count = agent.model.last_output_token_count
Gradio_UI.py+2-2