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
Close
Hashes for llama_index_packs_voyage_query_engine-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72c05dbce1be2c2f585f653521f09b52dbf3e2208341afbc7bf6c552ab5905aa |
|
MD5 | c481d2cc288ee2f451788ee22bbe978b |
|
BLAKE2b-256 | afecf064284103337c87ba2767c3fd0c9adf72dc70f9b607fd104c0d8b607da4 |
Close
Hashes for llama_index_packs_voyage_query_engine-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abb5ef1f56306044a6dd85ef43d34f13cac358ba6d5fec3628886fa0c9b5f912 |
|
MD5 | 943d2249a4005d17f05187dbe7192648 |
|
BLAKE2b-256 | 8db9017d62492933484c093441785d6acad73a9939d0ad2735e2d96be1b4a0a7 |