vanna-ai / vanna

🤖 Chat with your SQL database 📊. Accurate Text-to-SQL Generation via LLMs using RAG 🔄.
https://vanna.ai/docs/
MIT License
9.12k stars 673 forks source link

Split VannaFlaskApp into an API and full app #508

Open Molrn opened 2 weeks ago

Molrn commented 2 weeks ago

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)

zainhoda commented 2 weeks ago

I like this idea!