Skip to content
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

Feature Request: Enhanced Chatbot Interface for Models with Reasoning Capabilities #10232

Closed
1 task done
AaronCoder opened this issue Dec 20, 2024 · 3 comments
Closed
1 task done

Comments

@AaronCoder
Copy link

  • I have searched to see if a similar issue already exists.
    Yes, there is no similar question here

Is your feature request related to a problem? Please describe.

Currently, the ChatbotInterface component in Gradio primarily focuses on displaying the final output of language models. This is insufficient for models with reasoning capabilities like gemini-2.0-flash-thinking-exp-1219. Currentlly, these models output both the reasoning process and the final answer in a single, undifferentiated text stream, making it difficult for users to quickly grasp the conclusion while still having access to the reasoning behind it.

Describe the solution you'd like

I propose enhancing the ChatbotInterface to support a structured display of models with reasoning capabilities. The key improvement is to display the reasoning process within a collapsible panel, similar to an Accordion panel. This allows users to focus on the final answer initially, but easily expand the panel to view the detailed reasoning steps when needed.

Additional context
Example using `gemini-2.0-flash-thinking-exp-1219

Imagine a user asks: "What is the capital of France?"

Current Display:

The user is asking for the capital city of France. I know this is a common piece of general knowledge. The answer is Paris.
Paris.

Proposed Enhanced Display (with reasoning shown, initially collapsed as an accordion):

Final Answer:
Paris.

[+ Show Reasoning]  (Clicking this expands the accordion panel below)

Reasoning:
1. The user is asking for the capital city of France. 
2. I know this is a common piece of general knowledge. 
3.  The answer is Paris.

This enhancement would significantly improve the usability of Gradio for showcasing and interacting with state-of-the-art language models, providing better explainability. I really hope the team can consider this and add support for mainstream reasoning models, thank you

@AaronCoder
Copy link
Author

My bad,I can using metadata to show the reasoning steps

@freddyaboulton
Copy link
Collaborator

We're about to update the reasoning UI as well @AaronCoder ! See #10226

@AaronCoder
Copy link
Author

Wow, thank you Freddy. I am particularly excited about the upcoming update to the reasoning UI. Nice job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants