You can update any of the model parameters, remove models, or list all the models that are part of your Model endpoint management. You can also update or remove the secrets associated with your models.
Manage Models
Manage your model metadata after adding a model.
Update a model
To update the model, call the following function with the updated parameters:
CALL
google_ml.alter_model(
model_id => 'MODEL_ID',
model_request_url => 'REQUEST_URL',
model_provider => 'PROVIDER_ID',
model_type => 'MODEL_TYPE',
model_qualified_name => 'MODEL_QUALIFIED_NAME',
model_auth_type => 'AUTH_TYPE',
model_auth => 'AUTH_ID',
generate_headers_fn => 'GEN_HEADER_FUNCTION',
model_in_transform_fn => 'INPUT_TRANSFORM_FUNCTION',
model_out_transform_fn => 'OUTPUT_TRANSFORM_FUNCTION');
MODEL_ID
: a unique ID for the model that you define.REQUEST_URL
: the model-specific endpoint when adding other text embedding and generic models.PROVIDER_ID
: the provider of the model.MODEL_TYPE
: the model type.MODEL_QUALIFIED_NAME
: the fully qualified name in case the model has multiple versions-for example,textembedding-gecko@001
ortextembedding-gecko@002
.AUTH_TYPE
: the authentication type used by the model.AUTH_ID
: the secret ID in Secret Manager.GEN_HEADER_FUNCTION
: the function name you set to generate custom headers.INPUT_TRANSFORM_FUNCTION
: the function to transform input of the corresponding prediction function to the model specific input.OUTPUT_TRANSFORM_FUNCTION
: the function to transform model specific output to the prediction function output.You must set all parameters regardless of the number of parameters that have changed. Any update to the model ID requires updating the prediction queries that refer to the older model ID. For complete information about parameters in the function, see model endpoint management reference.
Remove a model
To remove the model, call the following function:
CALL google_ml.drop_model('MODEL_ID');
List models
To list a model information, call the following function:
CALL google_ml.list_model('MODEL_ID');
View model information
To view information of all registered models, use the following SQL statement:
SELECT * FROM google_ml.model_info_view
Manage Secrets
Manage your model secrets after adding a model.
Remove a secret
To remove a secret, call the following function:
CALL google_ml.drop_sm_secret('SECRET_ID');
Update a secret
To update a secret, call the following function:
CALL
google_ml.alter_sm_secret(
secret_id => 'SECRET_ID',
secret_path => 'SECRET_PATH' );
What's next
- Learn about the model endpoint management reference.