llama-index packs voyage_query_engine integration
Project description
Voyage Query Engine Pack
Create a query engine using GPT4 and Voyage AI Embeddings.
CLI Usage
You can download llamapacks directly using llamaindex-cli
, which comes installed with the llama-index
python package:
llamaindex-cli download-llamapack VoyageQueryEnginePack --download-dir ./voyage_pack
You can then inspect the files at ./voyage_pack
and use them as a template for your own project.
Code Usage
You can download the pack to a the ./voyage_pack
directory:
from llama_index.core.llama_pack import download_llama_pack
# download and install dependencies
VoyageQueryEnginePack = download_llama_pack(
"VoyageQueryEnginePack", "./voyage_pack"
)
# You can use any llama-hub loader to get documents!
voyage_pack = VoyageQueryEnginePack(documents)
From here, you can use the pack, or inspect and modify the pack in ./voyage_pack
.
The run()
function is a light wrapper around index.as_query_engine().query()
.
response = voyage_pack.run(
"What did the author do growing up?", similarity_top_k=2
)
You can also use modules individually.
# Use the index directly
index = voyage_pack.index
query_engine = index.as_query_engine()
retriever = index.as_retriever()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llama_index_packs_voyage_query_engine-0.2.0.tar.gz
.
File metadata
- Download URL: llama_index_packs_voyage_query_engine-0.2.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8191f72f0b142adcb2af29947322a74ccfdccdf4d9d871266be3b18fb7b6117b |
|
MD5 | cbbc837760722305b21f2b8146af19e1 |
|
BLAKE2b-256 | 7e4b507a81334e749d5a80b9e840ea25c0df4a8b33a392eaf5c11773e2d69ef5 |
File details
Details for the file llama_index_packs_voyage_query_engine-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_packs_voyage_query_engine-0.2.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e07e83f0cfff7fef51b093a7b4f4da333c35dfd61dbb651f441b54549654dc57 |
|
MD5 | 9ebcd867ff24953faffe1058ce2d014d |
|
BLAKE2b-256 | 3bb78e566e96e19fb3b2c99913d31ded9eb555b27114529f8c68b95c25594fcd |