Thanks to visit codestin.com
Credit goes to github.com

Skip to content

kungbi/LLM_RAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Text2SQL

✨Run Text2SQL in your local machine and connect to DB!✨

Getting Started

Prerequisites

  • 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

Installation

$ python3 -m venv .env
$ source .env/bin/activate
$ pip install -r requirements.txt

Add LLM Path for Semantic Router

#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"

Preparation

  • Start LLM on your local server with LMStudio (localhost:1234)
  • Start OpenSearch server (localhost:9200)
  • Start MSSQL Server

Start Application

$ streamlit run src/app.py

About The Project

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

Flowchart

Text_to_SQL_Flowchart (1)

Built with

  • Python
  • OpenSearch
  • LangChain
  • Streamlit
  • Docker
  • LM Studio
  • MSSQL

Acknowledgments

About

✨Run Text2SQL in your local machine and connect to DB!✨

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages