Metadata-Version: 2.1
Name: llama-index-packs-zephyr-query-engine
Version: 0.3.0
Summary: llama-index packs zephyr_query_engine integration
License: MIT
Keywords: engine,huggingface,index,local,query,zephyr
Author: Your Name
Author-email: you@example.com
Maintainer: logan-markewich
Requires-Python: >=3.8.1,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: accelerate (>=0.26.1,<0.27.0)
Requires-Dist: bitsandbytes (>=0.42.0,<0.43.0)
Requires-Dist: llama-index-core (>=0.11.0,<0.12.0)
Requires-Dist: llama-index-llms-huggingface (>=0.3.0,<0.4.0)
Requires-Dist: torch (>=2.1.2,<3.0.0)
Requires-Dist: transformers (>=4.37.1,<5.0.0)
Description-Content-Type: text/markdown

# Zephyr Query Engine Pack

Create a query engine using completely local and private models -- `HuggingFaceH4/zephyr-7b-beta` for the LLM and `BAAI/bge-base-en-v1.5` for embeddings.

## CLI Usage

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

```bash
llamaindex-cli download-llamapack ZephyrQueryEnginePack --download-dir ./zephyr_pack
```

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

## Code Usage

You can download the pack to a the `./zephyr_pack` directory:

```python
from llama_index.core.llama_pack import download_llama_pack

# download and install dependencies
ZephyrQueryEnginePack = download_llama_pack(
    "ZephyrQueryEnginePack", "./zephyr_pack"
)

# You can use any llama-hub loader to get documents!
zephyr_pack = ZephyrQueryEnginePack(documents)
```

From here, you can use the pack, or inspect and modify the pack in `./zephyr_pack`.

The `run()` function is a light wrapper around `index.as_query_engine().query()`.

```python
response = zephyr_pack.run(
    "What did the author do growing up?", similarity_top_k=2
)
```

You can also use modules individually.

```python
# Use the llm
llm = zephyr_pack.llm
response = llm.complete("What is HuggingFace?")

# Use the index directly
index = zephyr_pack.index
query_engine = index.as_query_engine()
retriever = index.as_retriever()
```

