ndcolomacook17/llama-index-tutor

Llama Index for education resource querying

0

stars

20

commits

Python

primary language

Jan 13, 2024

updated

README

llama-index-tutor

Llama Index for natural language to SQL querying. This structued_data.py example uses a local llama LLM for the model (download here) but any local or hosted model can be dropped in.

Install on M3:

I cloned the llamacpp repo and did this:

arch -arm64 pip install .  --upgrade --force-reinstall --no-cache-dir

Install dependencies

pip install -r requirements.txt

Config

Touch a .env file

touch .env

Ensure you define the following env vars:

# dir where your local llms are
MODELS_PATH

# local llm model file (must be .gguf)
MODEL_NAME

# dir for local data to be indexed
DATA_PATH

# all database related creds (default mysql)
MYSQL_USERNAME, MYSQL_PASSWORD, HOST, PORT, DATABASE

Usage

For natural language to SQL querying, this will spin up a flask server with a query input:

python3 structured_data.py

Run:

http POST http://127.0.0.1:5050/query query="Some query about your in-context tables"

Contributors

ndcolomacook17

12 commits

ianm199

1 commits

ndcolomacook17/llama-index-tutor

Llama Index for education resource querying

0

stars

20

commits

Python

primary language

Jan 13, 2024

updated

README

llama-index-tutor

Llama Index for natural language to SQL querying. This structued_data.py example uses a local llama LLM for the model (download here) but any local or hosted model can be dropped in.

Install on M3:

I cloned the llamacpp repo and did this:

arch -arm64 pip install .  --upgrade --force-reinstall --no-cache-dir

Install dependencies

pip install -r requirements.txt

Config

Touch a .env file

touch .env

Ensure you define the following env vars:

# dir where your local llms are
MODELS_PATH

# local llm model file (must be .gguf)
MODEL_NAME

# dir for local data to be indexed
DATA_PATH

# all database related creds (default mysql)
MYSQL_USERNAME, MYSQL_PASSWORD, HOST, PORT, DATABASE

Usage

For natural language to SQL querying, this will spin up a flask server with a query input:

python3 structured_data.py

Run:

http POST http://127.0.0.1:5050/query query="Some query about your in-context tables"

Contributors

ndcolomacook17

12 commits

ianm199

1 commits

Languages

Python

100.0%