mirror of
https://github.com/hwchase17/langchain
synced 2024-11-04 06:00:26 +00:00
…
|
||
---|---|---|
.. | ||
sql_llamacpp | ||
tests | ||
nba_roster.db | ||
poetry.lock | ||
pyproject.toml | ||
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
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.
Installation
# from inside your LangServe instance
poe add sql/llama2-ollama