Skip to main content

llama-index readers myscale integration

Project description

LlamaIndex Readers Integration: Myscale

Overview

MyScale Reader allows loading data from a MyScale backend. It constructs a query to retrieve documents based on a given query vector and additional search parameters.

Installation

You can install Myscale Reader via pip:

pip install llama-index-readers-myscale

Usage

from llama_index.readers.myscale import MyScaleReader

# Initialize MyScaleReader
reader = MyScaleReader(
    myscale_host="<MyScale Host>",  # MyScale host address
    username="<Username>",  # Username to login
    password="<Password>",  # Password to login
    database="<Database Name>",  # Database name (default: 'default')
    table="<Table Name>",  # Table name (default: 'llama_index')
    index_type="<Index Type>",  # Index type (default: "IVFLAT")
    metric="<Metric>",  # Metric to compute distance (default: 'cosine')
    batch_size=32,  # Batch size for inserting documents (default: 32)
    index_params=None,  # Index parameters for MyScale (default: None)
    search_params=None,  # Search parameters for MyScale query (default: None)
)

# Load data from MyScale
documents = reader.load_data(
    query_vector=[0.1, 0.2, 0.3],  # Query vector
    where_str="<Where Condition>",  # Where condition string (default: None)
    limit=10,  # Number of results to return (default: 10)
)

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_myscale-0.4.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_readers_myscale-0.4.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_myscale-0.4.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_myscale-0.4.1.tar.gz
Algorithm Hash digest
SHA256 cc536b2962fcc0d9d7154d8d71afdea91bf2aa004383a3ad4a5c08041e9845e2
MD5 e0250c77ab990489ec5c616d953a4222
BLAKE2b-256 d1fdd6712273b017c6eaf3b5a3cd6884217bf14a421ed781f55ff67c8532f6e1

See more details on using hashes here.

File details

Details for the file llama_index_readers_myscale-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_myscale-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 914cde24e02f59e31d11b98faf2261b40bf56b4fb9fb10a6f50da0c25f3d3c85
MD5 1d076251d47ad50780ecad133ee1eb45
BLAKE2b-256 82d359a0f7534adc517d6f32c8c6d71d90cfb9ac2d0be436775b51ddebf040dd

See more details on using hashes here.

Supported by

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