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.0.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.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_vector_stores_mariadb-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e5ee8aab702c98d710d5fa740c0c1e1de0dbdcd413f83981c02b0995875d04e7
MD5 5d108099c0a69db8c13b262823baced3
BLAKE2b-256 35d83ff49752ea68524ef75c7801b0b099dc2aeb121af88c6dd57736dc7ea7f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_vector_stores_mariadb-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f2ff0aea36d6019666e0270470ade10784654ffb43731a179f4724f0856531c
MD5 4ec02d32d892cbc35a83a62c8cc4318a
BLAKE2b-256 546633d2cec3458b4884a05538c998888758844ba56a43d7d455ee04577f725f

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