Skip to content

A flask-based app using OpenAI API , Langchain and SQLAlchemy to query a SQL-based database from natural language.

Notifications You must be signed in to change notification settings

HarshJ23/flask-app-NL2SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat with tabular(SQL) database

A flask-based app using OpenAI API , Langchain and SQLAlchemy to query a SQL-based database from natural language.

The SQL Database is hosted on Azure SQL server.

Approach :

  1. Convert user's natural language query into a SQL query using GPT-3.5-Turbo API.

  2. Using SQL query , interact with the database through SQLAlchemy.

  3. Get output from executed SQL query

  4. Return final natural language output along with SQL query output using GPT-3.5-Turbo API.

From langchain documentation: App Screenshot

Please check the following link for Frontend code: Frontend code repo

Conclusion

If you think this repo helped you , make sure to star this repository !

About

A flask-based app using OpenAI API , Langchain and SQLAlchemy to query a SQL-based database from natural language.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published