This example demonstrates how to query our SQL database using natural language by leveraging the LLM OpenAI and LlamaIndex. It was adapted from this example by Jerry Liu to add support for multiple tables and foreign keys.
I recorded a demo video here if you don't feel like reading the code.
You'll need an API key from OpenAI and to install LlamaIndex pip install llama-index