llama-index-integrations/vector_stores/llama-index-vector-stores-alibabacloud-mysql/README.md
Alibaba Cloud MySQL supports vector search functionality. This package provides a vector store implementation that allows you to use Alibaba Cloud MySQL as a vector database in LlamaIndex.
pip install llama-index-vector-stores-alibabacloud-mysql
from llama_index.vector_stores.alibabacloud_mysql import (
AlibabaCloudMySQLVectorStore,
)
vector_store = AlibabaCloudMySQLVectorStore(
host="your-instance-endpoint.mysql.rds.aliyuncs.com",
port=3306,
user="llamaindex",
password="password",
database="vectordb",
)
Or using the from_params class method:
from llama_index.vector_stores.alibabacloud_mysql import (
AlibabaCloudMySQLVectorStore,
)
vector_store = AlibabaCloudMySQLVectorStore.from_params(
host="your-instance-endpoint.mysql.rds.aliyuncs.com",
port=3306,
user="llamaindex",
password="password",
database="vectordb",
)
A suite of integration tests is available to verify the Alibaba Cloud MySQL vector store integration. The test suite needs an Alibaba Cloud MySQL database with vector search support up and running. If not found, the tests are skipped.
pytest -v