Skip to main content

llama-index readers dashvector integration

Project description

LlamaIndex Readers Integration: Dashvector

Overview

DashVector Reader is a tool designed to retrieve documents from DashVector clusters efficiently.

Installation

You can install DashVector Reader via pip:

pip install llama-index-readers-dashvector

To use DashVector, you must have an API key. Here are the installation instructions

Usage

from llama_index.core.schema import Document
from llama_index.readers.dashvector import DashVectorReader

# Initialize DashVectorReader with the API key and cluster endpoint
reader = DashVectorReader(
    api_key="<Your API Key>", endpoint="<Cluster Endpoint>"
)

# Load data from DashVector
documents = reader.load_data(
    collection_name="<Collection Name>",
    id_to_text_map={"id1": "text1", "id2": "text2"},  # Map from IDs to text
    vector=[0.1, 0.2, 0.3],  # Query vector
    top_k=10,  # Number of results to return
    separate_documents=True,  # Whether to return separate documents
    filter=None,  # Optional: Filter conditions
    include_vector=True,  # Whether to include the embedding in the response
)

This loader is designed to be used as a way to load data into LlamaIndex and/or subsequently used as a Tool in a LangChain Agent.

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

llama_index_readers_dashvector-0.1.3.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

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