feat: Add Gradio chat interface example #89
Merged
+247
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello OpenAI Team,
This pull request introduces a Gradio chat interface, located at
examples/gradio/gradio_chat.py
. It is designed to be a direct parallel to the existing Streamlit example, providing the same functionality and user controls for interacting with thegpt-oss
models.Motivation
The primary motivation is to lower the barrier to entry for developers familiar with the Gradio and Hugging Face ecosystem. Since
gpt-oss
models are hosted on Hugging Face Spaces, a native Gradio example provides an intuitive and highly relevant reference implementation for a significant portion of the user community.Acknowledging the Contribution Policy
I have carefully read the contribution guidelines in the
README.md
, which state that the repository is primarily focused on bug fixes rather than new feature contributions.I am proposing this addition as an exception because it aligns perfectly with the precedent and educational spirit of the existing
examples/streamlit/
directory. This PR:Commitment to Maintenance
To address any potential maintenance concerns, I am happy to help maintain this example and ensure it remains functional with future updates to Gradio or the responses API.
The Alternative
Of course, I completely respect the project's scope. If you feel this is better suited for the community list, I am more than happy to close this PR and submit a new one that adds a link to my standalone repository in
awesome-gpt-oss.md
instead.Thank you for your time and for considering this contribution.