-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding duration, step number, token counts, and nested structure to gradio UI #270
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the enhancement, @yvrjsharma.
Please note there are some conflicts with the main branch that need to be addressed.
- Add virtual separation between steps - Highlight final answer as required in internal discussion - Show step numbers and token counts - Include step duration tracking - Improve message display sturucture Adding duration, step number, token counts, and nested structure to agents response
Yes, looking into this now, thanks for pointing it out @albertvillanova
|
I observed that the latest code updates lack |
dcc7611
to
d8e7091
Compare
@@ -58,14 +107,21 @@ def stream_to_gradio( | |||
additional_args: Optional[dict] = None, | |||
): | |||
"""Runs an agent with the given task and streams the messages from the agent as gradio ChatMessages.""" | |||
if not _is_package_available("gradio"): | |||
raise ModuleNotFoundError( | |||
"Please install 'gradio' extra to use the GradioUI: `pip install 'smolagents[audio]'`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep this message here, no? But there's a typo: smolagents[audio]
-> smolagents[gradio]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closing this PR since #384 merges it! thanks a lot @yvrjsharma ! |
New Feature: Enhanced Gradio Agent UI with Nested Thoughts and Step metrics
Motivation
The current Gradio UI for displaying agent outputs doesn't take full advantage of Gradio's new agentic UI features, which makes it harder to understand agent reasoning and track performance. Specifically:
Feature Description
This PR enhances the Gradio UI to:
Layout Example
Before this PR, agent outputs looked like:
After this PR, outputs are properly nested with metrics: