Given an SQL database, ChatDB dynamically generates comprehensive prompts that contain information about your database schema and the meaning of each column.
This information is then used by an LLM to generate SQL to extract the relevant data, and return it in a interactive graphic or text summary.
Query: "Graph a line chart of beer sales in the 2023-24 period."
Query: "At what hours do most beer sales usually occur?"
Query: "Using 2023 beer sales, what do you forecast future sales will look like?"
A PostgreSQL connection is required.
You can instantiate the inference llm class with different services or LLMs which require (see docstring for more):
-
OpenAI API key in environment variable
OPENAI_API_KEY(see docs) -
path to local
.gguffile -
HuggingFace🤗 model link
fastapi dev main_api.py
fastapi run main_api.py



