The CREATE_AI_MODEL procedure is used to create an AI model object, specifying the model's name, type, and other attributes.
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:
|
The data types of both type and model_name are JSON STRING |
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 with type dense_embedding and large model text-embedding-v2.
CALL DBMS_AI_SERVICE.CREATE_AI_MODEL (
'my_ai_model_1', '{
"type": "dense_embedding",
"model_name": "text-embedding-v2"
}');