The CREATE_AI_MODEL procedure is used to create an AI model object, requiring the specification of attributes 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 | Parameters related to the AI model, which must be a JSON object. Supported parameters:
|
type and model_name are both of the JSON STRING data type. |
The value of type can only be dense_embedding, sparse_embedding, completion, or rerank. |
No |
The value of model_name is the specific name of the large model, for example, text-embedding-v2 |
No |
Examples
Create an AI model object of type dense_embedding and 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"
}');