You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/templates/sql-llamacpp
Bagatur 2424fff3f1
notebook fmt (#12498)
8 months ago
..
sql_llamacpp notebook fmt (#12498) 8 months ago
tests Templates (#12294) 9 months ago
README.md Update SQL templates (#12464) 8 months ago
poetry.lock Templates (#12294) 9 months ago
pyproject.toml Templates (#12294) 9 months ago
sql-llamacpp.ipynb notebook fmt (#12498) 8 months ago

README.md

SQL with LLaMA2 using Ollama

This template allows you to chat with a SQL database in natural language in private, using an open source LLM.

LLama.cpp

Enviorment

From here and here.

wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
bash Miniforge3-MacOSX-arm64.sh
conda create -n llama python=3.9.16
conda activate /Users/rlm/miniforge3/envs/llama
CMAKE_ARGS="-DLLAMA_METAL=on" FORCE_CMAKE=1 pip install -U llama-cpp-python --no-cache-dir

LLM

It will download Mistral-7b model from here.

You can select other files and specify their download path (browse here).

Set up SQL DB

This template includes an example DB of 2023 NBA rosters.

You can see instructions to build this DB here.