-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
OpenAPI docs not working #7287
Comments
We currently don't support this as (due to changes in Gradio 4.0), as its pretty hard to use the API endpoints directly. The ideal way is to use the Python or JS clients, which expose the API endpoint information both programmatically and in human-readable formats. https://www.gradio.app/guides/getting-started-with-the-python-client#inspecting-the-api-endpoints That being said, I know in some cases it'd be nice to have the OpenAPI docs, we're discussing the best way to do this, please follow this existing issue for updates: #672 |
@abidlabs I understand your reasoning for pushing the Python and JS clients, but having a standard HTTP API is really valuable and in particular allows for the use of any language client without needing dedicated maintenance on your side. For me in particular, it doesn't help that the JS client is currently broken on Node.js, and with the lack of documentation on the Gradio API endpoints, I'm forced to implement separate dedicated FastAPI endpoints exposing essentially the same functionality in order to be able to access it with a regular fetch call from Node.js. |
Totally agree @jpaquim, it's quite a bummer that the JS client is broken (we are working on fixing this right now cc @pngwn @hannahblair). We will also release regular HTTP APIs soon but its going to take longer since we have to develop a way to query the endpoints that is much friendlier to use. |
Describe the bug
Getting this error when trying to get the API docs as described in this comment:
pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.IsInstanceSchema (<class 'starlette.requests.Request'>)
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
No response
System Info
Severity
I can work around it
The text was updated successfully, but these errors were encountered: