-
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
Feature request: API Introspection #2364
Comments
Hi @leszekhanusz ! Is the api page at the bottom of the gradio front end in line with what you expect? If pass the |
Yes, but I want to access it programmatically, meaning I'd do another request and receive this info in a nice json form that could be exploited by a program, not html |
I've looked into this a bit more and in fact this already exists! This should definitely get a mention in the docs! |
Two interesting points here:
The API does go through a little churn atm, I do think we want to stabilise that in the future but I don't think we'll be able to do that until we make some more breaking changes (which we try to minimise). This will probably require a major version bump, so we can overhaul the signatures to be more robust to future changes. The first point is something we can definitely do. I'd like to leave this issue open so this concern doesn't fall off our radar but I'll open a new issue to document this feature (and maybe) clean up the API before we make it public. |
Yes makes sense @abidlabs ! |
Making an external frontend integrating with a gradio interface using the API can be really difficult if the gradio API is constantly changing.
Please provide a way to detect the inputs and outputs of a gradio API (it's too bad the interface is not made using GraphQL or we would be able to use introspection)
Context: I'm currently writing a GUI for a gradio interface and the gradio interface is constantly changing, breaking the API in the process.
I would like to programmatically send a request to the API to detect the different functions, fn_id, inputs and outputs of the interface, the default input values, min, max, type of input, etc...
The text was updated successfully, but these errors were encountered: