In V4.4.1 of ODC, you can integrate with Large Language Models (LLMs) to implement AI data development capabilities.
Background information
The SQL console integrates AI capabilities. You can use it to query knowledge about OceanBase Database and SQL development techniques. You can also use it to perform intelligent processing such as SQL generation, rewriting, correction, and formatting.
Configure the vector database
Before you integrate with LLMs, you must use the OceanBase vector database to store metadata. You can choose one of the following two methods:
- Use the ODC metadata database as the vector database.
- Use an independently deployed OceanBase vector database.
Use the ODC metadata database as the vector database
By default, ODC uses the metadata database as the vector database. No additional metadata modification is required. However, the following conditions must be met:
- The metadata database version is V4.3.3 or later.
- The ob_vector_memory_limit_percentage parameter is enabled. For more information, see ob_vector_memory_limit_percentage.
Use an independently deployed OceanBase vector database
To use an independently deployed OceanBase vector database, you must enable the ob_vector_memory_limit_percentage parameter and modify the ODC metadata database configuration.
Log in to the independently deployed OceanBase database based on the actual configuration.
Enable the ob_vector_memory_limit_percentage parameter. For more information, see ob_vector_memory_limit_percentage.
Log in to the ODC metadata database based on the actual configuration.
Execute the following SQL statements to configure the login information of the OceanBase vector database.
insert into config_system_configuration (`key`,value) values ('odc.datasource.vectordb.url','jdbc:oceanbase://{IP address}:{Port}/{Database name}?allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useCompatibleMetadata=true'); insert into config_system_configuration (`key`,value) values ('odc.datasource.vectordb.username','{Username}'); insert into config_system_configuration (`key`,value) values ('odc.datasource.vectordb.password','{Password}'); insert into config_system_configuration (`key`,value) values ('odc.datasource.vectordb.driver-class-name', 'com.oceanbase.jdbc.Driver');Restart ODC.
Configure the model
Log in to Web ODC. In the left-side navigation pane, choose Integrations > LLM Integration.
In the LLM integration section, enable the AI services and select the required features, such as embedded conversation and code completion.
Select the system default model. For more information about how to select other models, see Add a model.
SQL Generation Model: The default model for SQL generation, rewriting, and completion.
Embedding Model: The default model for text embedding processing. Switching the model may cause retrieval failures, so proceed with caution.
Add a model
ODC allows you to add custom models, including CHAT and EMBEDDING types. The supported vendors are DeepSeek, Doubao, OpenAl-API-compatible, and Qwen.
The following example shows how to add a Doubao model.
Click Add Model in the lower-right corner of the Doubao block.
In the Add Model dialog box, select the model type and fill in the relevant parameters.
Click OK.
View the added model in the right-side pane. You can edit or delete the model.
