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
)

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.3.0.tar.gz (5.9 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.3.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_vector_stores_mariadb-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4888191ce42f46af267a997e9dae35b17ab0c8e2825d6377a0636883ca899d50
MD5 06c514eb81ced467e29d895f6ccf3b26
BLAKE2b-256 9ef6039f2c4e611d85c565e9b9d4c5400ad1185b3beb0f3d064e42dca03e036d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_vector_stores_mariadb-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f54c644cd755af9b9d6c1cda26345444208d71e052b05fa4d9079eb0279a4c0
MD5 e149948640b5154a61439aae73f114d9
BLAKE2b-256 7d434f69dbdc0f29f6f2343b4f46b2ce52b6f01886c68a55f663918baca060b4

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