Vanna AI LLamaPack
Vanna AI is an open-source RAG framework for SQL generation. It works in two steps:
- Train a RAG model on your data
- Ask questions (use reference corpus to generate SQL queries that can run on your db).
Check out the Github project and the docs for more details.
This LlamaPack creates a simple VannaQueryEngine with vanna, ChromaDB and OpenAI, and allows you to train and ask questions over a SQL database.
CLI Usage
You can download llamapacks directly using llamaindex-cli, which comes installed with the llama-index python package:
llamaindex-cli download-llamapack VannaPack --download-dir ./vanna_pack
You can then inspect the files at ./vanna_pack and use them as a template for your own project!
Code Usage
You can download the pack to a ./vanna_pack directory:
from llama_index.core.llama_pack import download_llama_pack
# download and install dependencies
VannaPack = download_llama_pack("VannaPack", "./vanna_pack")
From here, you can use the pack, or inspect and modify the pack in ./vanna_pack.
Then, you can set up the pack like so:
pack = VannaPack(
openai_api_key="<openai_api_key>",
sql_db_url="chinook.db",
openai_model="gpt-3.5-turbo",
)
The run() function is a light wrapper around llm.complete().
response = pack.run("List some sample albums")
You can also use modules individually.
query_engine = pack.get_modules()["vanna_query_engine"]
Metadata
Release files for llama-index-packs-vanna 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_index_packs_vanna-0.3.0.tar.gz | 3.4 kB | Without provenance | Details for llama_index_packs_vanna-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_packs_vanna-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_packs_vanna-0.3.0-py3-none-any.whl |
Total release size: 7.0 kB
Release files / llama_index_packs_vanna-0.3.0.tar.gz
| Download URL | llama_index_packs_vanna-0.3.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef1d14c527ad7cf7423817c09ad336e0cbb8f174e056a72337f08ac2e5fa1995
|
|
BLAKE2b-256 checksum How to use checksums |
22f106637545908fa7f45756b9987a75c45929bf5b755c1ff1bfbd64fc645a8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
|
Release files / llama_index_packs_vanna-0.3.0-py3-none-any.whl
| Download URL | llama_index_packs_vanna-0.3.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
316ffe9e3b0223d398d7f06c4e1893c0076eb2ad3c48ec7fe271998e79b94c0f
|
|
BLAKE2b-256 checksum How to use checksums |
a84d00065668758f02beb53b932a02e63d43284a76b9385a95d8cb5d007c97cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
|
Security for llama-index-packs-vanna 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.