llama-index-packs-vanna


Namellama-index-packs-vanna JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
Summaryllama-index packs vanna integration
upload_time2024-11-17 22:42:24
maintainerjerryjliu
docs_urlNone
authorYour Name
requires_python<4.0,>=3.9
licenseMIT
keywords ai sql text-to-sql vanna
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Vanna AI LLamaPack

Vanna AI is an open-source RAG framework for SQL generation. It works in two steps:

1. Train a RAG model on your data
2. Ask questions (use reference corpus to generate SQL queries that can run on your db).

Check out the [Github project](https://github.com/vanna-ai/vanna) and the [docs](https://vanna.ai/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:

```bash
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:

```python
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:

```python
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()`.

```python
response = pack.run("List some sample albums")
```

You can also use modules individually.

```python
query_engine = pack.get_modules()["vanna_query_engine"]
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-packs-vanna",
    "maintainer": "jerryjliu",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "ai, sql, text-to-sql, vanna",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/22/f1/06637545908fa7f45756b9987a75c45929bf5b755c1ff1bfbd64fc645a8c/llama_index_packs_vanna-0.3.0.tar.gz",
    "platform": null,
    "description": "# Vanna AI LLamaPack\n\nVanna AI is an open-source RAG framework for SQL generation. It works in two steps:\n\n1. Train a RAG model on your data\n2. Ask questions (use reference corpus to generate SQL queries that can run on your db).\n\nCheck out the [Github project](https://github.com/vanna-ai/vanna) and the [docs](https://vanna.ai/docs/) for more details.\n\nThis LlamaPack creates a simple `VannaQueryEngine` with vanna, ChromaDB and OpenAI, and allows you to train and ask questions over a SQL database.\n\n## CLI Usage\n\nYou can download llamapacks directly using `llamaindex-cli`, which comes installed with the `llama-index` python package:\n\n```bash\nllamaindex-cli download-llamapack VannaPack --download-dir ./vanna_pack\n```\n\nYou can then inspect the files at `./vanna_pack` and use them as a template for your own project!\n\n## Code Usage\n\nYou can download the pack to a `./vanna_pack` directory:\n\n```python\nfrom llama_index.core.llama_pack import download_llama_pack\n\n# download and install dependencies\nVannaPack = download_llama_pack(\"VannaPack\", \"./vanna_pack\")\n```\n\nFrom here, you can use the pack, or inspect and modify the pack in `./vanna_pack`.\n\nThen, you can set up the pack like so:\n\n```python\npack = VannaPack(\n    openai_api_key=\"<openai_api_key>\",\n    sql_db_url=\"chinook.db\",\n    openai_model=\"gpt-3.5-turbo\",\n)\n```\n\nThe `run()` function is a light wrapper around `llm.complete()`.\n\n```python\nresponse = pack.run(\"List some sample albums\")\n```\n\nYou can also use modules individually.\n\n```python\nquery_engine = pack.get_modules()[\"vanna_query_engine\"]\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index packs vanna integration",
    "version": "0.3.0",
    "project_urls": null,
    "split_keywords": [
        "ai",
        " sql",
        " text-to-sql",
        " vanna"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a84d00065668758f02beb53b932a02e63d43284a76b9385a95d8cb5d007c97cc",
                "md5": "f4e88a7b073f89e69340c713df22f0d2",
                "sha256": "316ffe9e3b0223d398d7f06c4e1893c0076eb2ad3c48ec7fe271998e79b94c0f"
            },
            "downloads": -1,
            "filename": "llama_index_packs_vanna-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f4e88a7b073f89e69340c713df22f0d2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 3603,
            "upload_time": "2024-11-17T22:42:23",
            "upload_time_iso_8601": "2024-11-17T22:42:23.333689Z",
            "url": "https://files.pythonhosted.org/packages/a8/4d/00065668758f02beb53b932a02e63d43284a76b9385a95d8cb5d007c97cc/llama_index_packs_vanna-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "22f106637545908fa7f45756b9987a75c45929bf5b755c1ff1bfbd64fc645a8c",
                "md5": "b2faaad0d057f27b1985bf62a9a501b1",
                "sha256": "ef1d14c527ad7cf7423817c09ad336e0cbb8f174e056a72337f08ac2e5fa1995"
            },
            "downloads": -1,
            "filename": "llama_index_packs_vanna-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b2faaad0d057f27b1985bf62a9a501b1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 3371,
            "upload_time": "2024-11-17T22:42:24",
            "upload_time_iso_8601": "2024-11-17T22:42:24.162825Z",
            "url": "https://files.pythonhosted.org/packages/22/f1/06637545908fa7f45756b9987a75c45929bf5b755c1ff1bfbd64fc645a8c/llama_index_packs_vanna-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-17 22:42:24",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-packs-vanna"
}
        
Elapsed time: 0.39486s