The CREATE_AI_MODEL procedure is used to create an AI model object, specifying properties such as the model's name and type.
Syntax
PROCEDURE create_ai_model(
IN name VARCHAR(128),
IN params JSON);
Parameters
| Parameter | Description | Type | Value range | Nullable |
|---|---|---|---|---|
| name | The name of the AI model object. | VARCHAR(128) | No | |
| params | The parameters related to the AI model, which must be a JSON object. Supported parameters include:
|
type and model_name are both JSON strings |
type can only be dense_embedding, sparse_embedding, completion, or rerank |
No |
model_name specifies the name of the large model, for example, text-embedding-v2 |
No |
Examples
Create an AI model object of type dense_embedding with the large model text-embedding-v2.
CALL DBMS_AI_SERVICE.CREATE_AI_MODEL (
'my_ai_model_1', '{
"type": "dense_embedding",
"model_name": "text-embedding-v2"
}');
