Skip to main content

llama-index vector_stores mariadb integration

Project description

LlamaIndex Vector_Stores Integration: MariaDB

With the release of MariaDB 11.6 Vector Preview, the MariaDB relational database introduced the long-awaited vector search functionality. Thus now it can be used as a fully-functional vector store in LlamaIndex. Please note, however, that the latest MariaDB version is only an Alpha release, which means that it may crash unexpectedly.

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

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

Built Distribution

File details

Details for the file llama_index_vector_stores_mariadb-0.2.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_vector_stores_mariadb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 23663a7d0cb69aca2998c78d352cbabce951bff58d5b4d5d779d132e727d026f
MD5 33636cc880e82ac5ee0de59383704948
BLAKE2b-256 e93c83ee52442c4142c2f4de3a79cf059fcba512fe0852a3972ac1f65f62a2fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_vector_stores_mariadb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4a700bf1919c2f3662f471417aa8c5ccd937904549decdc2521b51096980399
MD5 4e7111f7556b608cd7d16a86c06b6323
BLAKE2b-256 b86ca72157104df9684d1ead070cbe36b820cc5b0373914c6eeef15ea916190a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page