Skip to main content

RAG Local CLI Pack

This LlamaPack implements a fully local version of our RAG CLI, with Mistral (through Ollama) and BGE-M3.

CLI Usage

You can download llamapacks directly using llamaindex-cli, which comes installed with the llama-index python package:

llamaindex-cli download-llamapack LocalRAGCLIPack --download-dir ./local_rag_cli_pack

You can then inspect the files at ./local_rag_cli_pack and use them as a template for your own project!

Code Usage

You can download the pack to a directory. NOTE: You must specify skip_load=True - the pack contains multiple files, which makes it hard to load directly.

We will show you how to import the agent from these files!

from llama_index.core.llama_pack import download_llama_pack

# download and install dependencies
download_llama_pack("LocalRAGCLIPack", "./local_rag_cli_pack", skip_load=True)

From here, you can use the pack. The most straightforward way is through the CLI. You can directly run base.py, or run the setup_cli.sh script.

cd local_rag_cli_pack

# option 1
python base.py rag -h

# option 2 - you may need sudo
# default name is lcli_local
sudo sh setup_cli.sh
lcli_local rag -h

You can also directly get modules from the pack.

from local_rag_cli_pack.base import LocalRAGCLIPack

pack = LocalRAGCLIPack(
    verbose=True, llm_model_name="mistral", embed_model_name="BAAI/bge-m3"
)
# will spin up the CLI
pack.run()

# get modules
rag_cli = pack.get_modules()["rag_cli"]
rag_cli.cli()

Metadata

Release files for llama-index-packs-rag-cli-local 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-packs-rag-cli-local 0.4.0
File Size Uploaded
llama_index_packs_rag_cli_local-0.4.0.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-packs-rag-cli-local 0.4.0
File Interpreter ABI Platform
llama_index_packs_rag_cli_local-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / llama_index_packs_rag_cli_local-0.4.0.tar.gz

Download URL llama_index_packs_rag_cli_local-0.4.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8fa023a32ff10327e2b7ac218f3383d560012059e1db60a5aa8de00e969a4130
BLAKE2b-256 checksum
How to use checksums
8c8d4c9d49aef4b644d493c28ae5a72dd1907f01979bdee2887463b5c2edfec7
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_rag_cli_local-0.4.0-py3-none-any.whl

Download URL llama_index_packs_rag_cli_local-0.4.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cfc6d96943b4af3fb5a76635347bb9e39f9aed84e66752750c969bad68a95b08
BLAKE2b-256 checksum
How to use checksums
3ada2498237873a8644e7332d1465130025681d5281f9c00ee25a4d0fdafb5d9
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 history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page