Skip to main content

llama-index readers singlestore integration

Project description

SingleStore Loader

pip install llama-index-readers-singlestore

The SingleStore Loader retrieves a set of documents from a specified table in a SingleStore database. The user initializes the loader with database information and then provides a search embedding for retrieving similar documents.

Usage

Here's an example usage of the SingleStoreReader:

from llama_index.readers.singlestore import SingleStoreReader

# Initialize the reader with your SingleStore database credentials and other relevant details
reader = SingleStoreReader(
    scheme="mysql",
    host="localhost",
    port="3306",
    user="username",
    password="password",
    dbname="database_name",
    table_name="table_name",
    content_field="text",
    vector_field="embedding",
)

# The search_embedding is an embedding representation of your query_vector.
# Example search_embedding:
#   search_embedding=[0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3]
search_embedding = [n1, n2, n3, ...]

# load_data fetches documents from your SingleStore database that are similar to the search_embedding.
# The top_k argument specifies the number of similar documents to fetch.
documents = reader.load_data(search_embedding=search_embedding, top_k=5)

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

Uploaded Source

Built Distribution

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

File details

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

File metadata

File hashes

Hashes for llama_index_readers_singlestore-0.4.1.tar.gz
Algorithm Hash digest
SHA256 0cbbcbaf9f34b700b38e8114eaee90c184e5e71a13b13226b0a82c8a6f99bb57
MD5 49bcdfd3d910a752d43b52282553c0a0
BLAKE2b-256 75ac42bb668a5b2838fbf73ad4c7639f207dbb6f0fe57eea7ba0936c07094290

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_readers_singlestore-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae0341cec057e5dd710e66cf507195be38c0877ae515e115633e67345335b925
MD5 51fae9b73e7c9e036edfc0f6ef514dc5
BLAKE2b-256 df7a909872138b6a8be6e6df1c6bdd017246fe6390c2570c94adfafd2ef60188

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