Use model endpoint management in AlloyDB Studio

This document shows how to use AlloyDB Studio to register and call model endpoints. You can then use the registered model endpoints to invoke predictions or generate embeddings.

For more information about model endpoint management, see Model endpoint management overview .

Call pre-registered embedding model endpoints

The supported pre-registered embedding models are listed in the Explorer paneof AlloyDB Studio.

  1. In the Google Cloud console, open the AlloyDBpage.

    Go to AlloyDB

  2. Select a cluster from the list.

  3. In the navigation menu, click AlloyDB Studio.

  4. In the Explorerpane, expand google_ml, and then click Models.

  5. Click more_vert View actionsnext to the pre-registered model, and then click Call model.

    The SQL query to generate embeddings using the pre-registered model appears.

  6. Enter your text for which you want to generate embedding, and then click Run.

For more information about other SQL queries using pre-registered embedding models, see Generate embeddings .

Register a model endpoint

You can use the template generated by the AlloyDB Studio to register a model endpoint. After registering the model endpoint, you can then start invoking predictions or generating embeddings.

  1. In the Google Cloud console, open the AlloyDBpage.

    Go to AlloyDB

  2. Select a cluster from the list.

  3. In the navigation menu, click AlloyDB Studio.

  4. In the Explorerpane, expand google_ml.

  5. Click more_vert View actionsnext to Models, and then click Register model.

  6. Modify required parameters based on the model endpoint provider. For more information about registering a model endpoint, see Register and call remote AI models .

  7. Click Runto register the model endpoint.

For more information about other SQL queries using registered model endpoints, see Invoke predictions or Generate embeddings .

Alter a pre-registered model endpoint

For pre-registered model endpoints, you can alter the model metadata, if required.

  1. In the Google Cloud console, open the AlloyDBpage.

    Go to AlloyDB

  2. Select a cluster from the list.

  3. In the navigation menu, click AlloyDB Studio.

  4. In the Explorerpane, expand google_ml, and then click Models.

  5. Click more_vert View actionsnext to the pre-registered model, and then click Alter model.

  6. Click Runto save the model endpoint metadata.

You can run the google_ml.alter_model() function in the Editortab of AlloyDB Studio to modify model metadata of other registered model endpoints. For more information, see Model endpoint management reference .

Delete a pre-registered model endpoint

  1. In the Google Cloud console, open the AlloyDBpage.

    Go to AlloyDB

  2. Select a cluster from the list.

  3. In the navigation menu, click AlloyDB Studio.

  4. In the Explorerpane, expand google_ml, and then click Models.

  5. Click more_vert View actionsnext to the pre-registered model, and then click Delete model.

  6. Click Runto delete the model endpoint.

You can run the google_ml.drop_model() function in the Editortab of AlloyDB Studio to delete other registered model endpoints. For more information, see Model endpoint management reference .

What's next

Create a Mobile Website
View Site in Mobile | Classic
Share by: