Setup
To access Oceanbase vector stores you’ll need to deploy a standalone OceanBase server: %docker run —name=ob433 -e MODE=mini -e OB_SERVER_IP=127.0.0.1 -p 2881:2881 -d quay.io/oceanbase/oceanbase-ce:4.3.3.1-101000012024102216 And install thelangchain-oceanbase integration package.
pip install -qU “langchain-oceanbase”
Check the connection to OceanBase and set the memory usage ratio for vector data:
Initialization
Configure the API key of the embedded model. Here we useDashScopeEmbeddings as an example. When deploying Oceanbase with a Docker image as described above, simply follow the script below to set the host, port, user, password, and database name. For other deployment methods, set these parameters according to the actual situation.
pip install dashscope
Manage vector store
Add items to vector store
- TODO: Edit and then run code cell to generate output