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
Built Distribution
File details
Details for the file llama_index_readers_myscale-0.3.0.tar.gz
.
File metadata
- Download URL: llama_index_readers_myscale-0.3.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90903b0a77a4c268e624d3d1f84b9c2cdc486705f646caced85f2f07c2d33390 |
|
MD5 | d724eae6f5f556a660820b366f886f97 |
|
BLAKE2b-256 | 8e0e6afcddf1ea15125584a41b60fefa597eb577c62b8f32641e2db90539732d |
File details
Details for the file llama_index_readers_myscale-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_readers_myscale-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac9529c444925e6125c32196d36776e829a7772084e4c82d7565d35790cd17b2 |
|
MD5 | fa018cd59fb31a6f5d67532e9b38e01f |
|
BLAKE2b-256 | d146c2e99b848cb3fe7b4a5eb8fe83ca4e9da480f87d320de9c61381ccf70b80 |