Skip to content

feat: Add Gradio chat interface example #89

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

Merged
merged 2 commits into from
Aug 12, 2025

Conversation

harshalmore31
Copy link
Contributor

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 the gpt-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:

  • Adds a Reference Example, Not a Feature: It does not alter any core logic, dependencies, or model functionality. It purely demonstrates how to use the existing API with a different, popular UI framework.
  • Maintains Parity: The Gradio app mirrors all the controls and features of the Streamlit demo, making it a true alternative rather than an expansion of scope.
  • Is Self-Contained: The example is a single, isolated file that does not impact any other part of the repository.

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.

@dkundel-openai dkundel-openai merged commit 1dcd7d0 into openai:main Aug 12, 2025
Danztee pushed a commit to Danztee/gpt-oss that referenced this pull request Aug 12, 2025
* feat: implement Gradio chatbot interface with function calling and browser search capabilities

* updates !
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

Successfully merging this pull request may close these issues.

3 participants