Vanna AI can adapt itself to any front-end, but it can also be deployed as an API. The class VannaFlaskApp is arleady itself an API, which is consumed by the JS frontend described in the assets.
This PR extracts the API endpoints and put them in a class named VannaFlaskAPI. VannaFlaskApp is then defined as class VannaFlaskApp(VannaFlaskAPI).
I think this would make it clearer for users that the Flask App can be used for its API, and could lead to interesting evolutions (example: documentation in OpenAPI format, appearance of other open-source apps consuming the API)
Vanna AI can adapt itself to any front-end, but it can also be deployed as an API. The class
VannaFlaskApp
is arleady itself an API, which is consumed by the JS frontend described in the assets.This PR extracts the API endpoints and put them in a class named
VannaFlaskAPI
.VannaFlaskApp
is then defined asclass VannaFlaskApp(VannaFlaskAPI)
.I think this would make it clearer for users that the Flask App can be used for its API, and could lead to interesting evolutions (example: documentation in OpenAPI format, appearance of other open-source apps consuming the API)