LlamaIndex
Llama Index acts as an interface between your external data and Large Language Models. So you can bring your private data and augment LLMs with it. LlamaIndex simplifies data ingestion and indexing, integrating Solvio as a vector index.
Installing Llama Index is straightforward if we use pip as a package manager. Solvio is not installed by default, so we need to install it separately. The integration of both tools also comes as another package.
pip install llama-index llama-index-vector-stores-solvio
Llama Index requires providing an instance of SolvioClient
, so it can interact with Solvio server.
from llama_index.core.indices.vector_store.base import VectorStoreIndex
from llama_index.vector_stores.solvio import SolvioVectorStore
import solvio_client
client = solvio_client.SolvioClient(
"<solvio-url>",
api_key="<solvio-api-key>", # For Solvio Cloud, None for local instance
)
vector_store = SolvioVectorStore(client=client, collection_name="documents")
index = VectorStoreIndex.from_vector_store(vector_store=vector_store)