Skip to main content

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.4.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_packs_voyage_query_engine-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4b61db650d48921907db0564511f5cd99f1cd15ab26bd709d8129617ee561ee3
MD5 fa7511d4a32b93c29640a4b95da3ff36
BLAKE2b-256 ea685043ddd657df0944b066b594a114a22804d25b00a807eea5107d7bcbbe50

See more details on using hashes here.

File details

Details for the file llama_index_packs_voyage_query_engine-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_packs_voyage_query_engine-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00518c7280967f315b31d05bc283f4e6d487be1c067cea40f554601bc4c520ad
MD5 d452a8df85868e67d6a14dcf4bd26244
BLAKE2b-256 c5c9e40f1d829087d7bd432d8ec2348e7fcce385fa0e27bd09f1a1ebd21c214c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page