Skip to main content

llama-index vector_stores mariadb integration

Project description

LlamaIndex Vector_Stores Integration: MariaDB

Starting with version 11.7.1, the MariaDB relational database has vector search functionality integrated. Thus now it can be used as a fully-functional vector store in LlamaIndex.

To learn more about the feature in MariaDB, check its Vector Overview documentation.

Please note that versions before 0.3.0 of this package are not compatible with MariaDB 11.7 and later. They are compatible only with the one-off MariaDB 11.6 Vector preview release which used a slightly different syntax.

Installation

pip install llama-index-vector-stores-mariadb

Usage

from llama_index.vector_stores.mariadb import MariaDBVectorStore

vector_store = MariaDBVectorStore.from_params(
    host="localhost",
    port=3306,
    user="llamaindex",
    password="password",
    database="vectordb",
    table_name="llama_index_vectorstore",
    embed_dim=1536,  # OpenAI embedding dimension
    default_m=6,  # MariaDB Vector system parameter
    ef_search=20,  # MariaDB Vector system parameter
)

Development

Running Integration Tests

A suite of integration tests is available to verify the MariaDB vector store integration. The test suite needs a MariaDB database with vector search support up and running. If not found, the tests are skipped. To facilitate that, a sample docker-compose.yaml file is provided, so you can simply do:

docker compose -f tests/docker-compose.yaml up

pytest -v

# Clean up when you finish testing
docker compose -f tests/docker-compose.yaml down

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_vector_stores_mariadb-0.4.1.tar.gz (7.6 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_vector_stores_mariadb-0.4.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_vector_stores_mariadb-0.4.1.tar.gz
Algorithm Hash digest
SHA256 e8b82a8f2c52579630e413cd8b134af5a5ad13967193ce70ac5afd3fb5acc9ca
MD5 a993d2d8f092a60cb3646f308201c3e4
BLAKE2b-256 2ad9dd9c36048b2d72a12e8de95d7864f156303f70cd701cc80d5d61d5868b83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_vector_stores_mariadb-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 149902ba054f26295844bc39e7b2aa7f0aa4ff8c177e83ce6c8e55f45aa5e452
MD5 6e753a8c4ad12ddb1aa680bf5711ed0c
BLAKE2b-256 bc1315698eaf070c6437b9287b84734e77a8a754a7eab876b4f3042d7ce0d031

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