✨Run Text2SQL in your local machine and connect to DB!✨
- LM Studio
- Qwen/Qwen2-7B-Instruct-GGUF/qwen2-7b-instruct-q4_0.gguf
- lmstudio-community/Meta-Llama-3-8B-Instruct-GGUF/Meta-Llama-3-8B-Instruct-IQ3_M.gguf
- nomic-ai/nomic-embed-text-v1.5-GGUF/nomic-embed-text-v1.5.Q8_0.gguf
- MS SQL Server (ODBC Driver 18 for SQL Server or ODBC Driver 17 for SQL Server)
- OpenSearch Server
$ python3 -m venv .env
$ source .env/bin/activate
$ pip install -r requirements.txt
#Open the file `src/env/llama_env.py`
#add path to LMStudio local llama model
LLAMA_MODEL_PATH = "/path/to/your/model/Meta-Llama-3-8B-Instruct-IQ3_M.gguf"
- Start LLM on your local server with LMStudio (localhost:1234)
- Start OpenSearch server (localhost:9200)
- Start MSSQL Server
$ streamlit run src/app.py
Text2SQL is a LLM domain for generating output based on DB schema and information from user's query.
Below is the the lifecycle of the application:
- Index your own DB Schema on OpenSearch
- User query
- DB Execution