llama-index-integrations/vector_stores/llama-index-vector-stores-volcenginemysql/README.md
This integration provides a VolcengineMySQLVectorStore that leverages the native vector index capabilities of Volcano engine Cloud Database for MySQL. It allows you to use RDS for MySQL as a fully-functional vector store in LlamaIndex for high-performance similarity search.
To learn more about the native vector feature in Volcengine RDS for MySQL, you can refer to its official documentation. This integration is specifically designed for Volcengine's enhanced MySQL and is not intended for standard community MySQL instances.
pip install llama-index-vector-stores-volcengine-mysql
from llama_index.vector_stores.volcengine_mysql import (
VolcengineMySQLVectorStore,
)
# Initialize the vector store
vector_store = VolcengineMySQLVectorStore.from_params(
host="your-rds-instance-host",
port=3306,
user="your-username",
password="your-password",
database="your-database",
table_name="llama_index_vector_store",
embed_dim=1536, # Example: OpenAI embedding dimension
)
To use this integration, you need a Volcengine RDS for MySQL instance with the following features enabled:
loose_vector_index_enabled parameter set to ON.VECTOR(N) data type for columns.VECTOR INDEX (HNSW) for indexing.TO_VECTOR(...), L2_DISTANCE(...), and COSINE_DISTANCE(...).