Se riscontri problemi durante l'esecuzione dei comandi precedenti o se l'estensione non viene aggiornata alla versione 1.4.3 dopo l'esecuzione dei comandi precedenti, contatta l'assistenza AlloyDB.
Dopo aver verificato che la versione sia aggiornata, installa la funzionalità di anteprima eseguendo la procedura upgrade_to_preview_version:
Accedere ai dati in Cloud Storage per generare incorporamenti multimodali
Per generare incorporamenti multimodali, fai riferimento ai contenuti in Cloud Storage utilizzando un URI gs://.
Accedi ai contenuti di Cloud Storage tramite l'agente di servizio Vertex AI del progetto attuale. Per impostazione predefinita, l'agente di servizio Vertex AI ha già l'autorizzazione per accedere al bucket nello stesso progetto.
Per maggiori informazioni, consulta l'indice di ruoli e autorizzazioni IAM.
Per accedere ai dati in un bucket Cloud Storage in un altro Google Cloud progetto,
esegui il seguente comando gcloud CLI per concedere il ruolo Visualizzatore oggetti Storage (roles/storage.objectViewer) all'agente di servizio Vertex AI del tuo
progetto AlloyDB.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[],[],null,["# Generate multimodal embeddings\n\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n| **Note:** This experimental launch is a Pre-GA offering.\n\nThis page describes how to generate multimodal embeddings using the supported\nVertex AI multimodal model, `multimodalembedding@001`.\n\nYou can use the Vertex AI multimodal embedding models referred to\nin [Supported models](/vertex-ai/generative-ai/docs/embeddings/get-multimodal-embeddings#supported-models).\n\nThis page assumes that you're familiar with AlloyDB for PostgreSQL and\n[generative AI concepts](/docs/generative-ai). For more information about embeddings, see [What are embeddings](/alloydb/docs/ai/work-with-embeddings#what-are-embeddings).\n\nBefore you begin\n----------------\n\nBefore you use multimodal embeddings, do the following:\n\n- [Verify that the `google_ml_integration` extension is installed](/alloydb/docs/ai/configure-vertex-ai#verify-installed-extension).\n- [Verify that the `google_ml_integration.enable_model_support` flag is set to `on`](/alloydb/docs/instance-configure-database-flags).\n- [Integrate with Vertex AI](/alloydb/docs/ai/configure-vertex-ai).\n- [Access data in Cloud Storage to generate multimodal embeddings](#access-data-in-storage).\n\n### Integrate with Vertex AI and install the extension\n\n1. [Integrate with Vertex AI](/alloydb/docs/ai/configure-vertex-ai).\n2. Ensure that the latest version of `google_ml_integration` is installed.\n 1. To check the installed version, run the following\n command:\n\n ```bash\n SELECT extversion FROM pg_extension WHERE extname = 'google_ml_integration';\n extversion\n ------------\n 1.4.3\n (1 row)\n \n ```\n 2. If the extension isn't installed or if the installed version is\n earlier than 1.4.3, update the extension by running the following commands:\n\n ```bash\n CREATE EXTENSION IF NOT EXISTS google_ml_integration;\n ALTER EXTENSION google_ml_integration UPDATE;\n \n ```\n\n If you experience issues when you run the preceding commands, or if the\n extension isn't updated to version 1.4.3 after you run the preceding\n commands, contact AlloyDB support.\n 3. After you ensure that the version is current, install the preview\n functionality by running the `upgrade_to_preview_version` procedure:\n\n ```bash\n CALL google_ml.upgrade_to_preview_version();\n SELECT extversion FROM pg_extension WHERE extname = 'google_ml_integration';\n extversion\n ------------\n 1.4.4\n (1 row)\n \n ```\n | Note: The expected version is 1.4.4 or later.\n\n### Access data in Cloud Storage to generate multimodal embeddings\n\n- To generate multimodal embeddings, refer to content in Cloud Storage using a `gs://` URI.\n- Access Cloud Storage content through your current project's Vertex AI service agent. By default, the Vertex AI service agent already has permission to access the bucket in the same project. For more information, see [IAM roles and permissions index](/iam/docs/understanding-roles#aiplatform.serviceAgent).\n- To access data in a Cloud Storage bucket in another Google Cloud project,\n run the following gcloud CLI command to grant the [Storage Object Viewer role (`roles/storage.objectViewer`)](/storage/docs/access-control/iam-roles) to the Vertex AI service agent of your\n AlloyDB project.\n\n gcloud projects add-iam-policy-binding \u003cANOTHER_PROJECT_ID\u003e \\\n --member=\"serviceAccount:service-\u003cPROJECT_ID\u003e@gcp-sa-aiplatform.iam.gserviceaccount.com\" \\\n --role=\"roles/storage.objectViewer\"\n\n For more information, see [Set and manage IAM policies on buckets](/storage/docs/access-control/using-iam-permissions).\n\nTo generate multimodal embeddings, select one of the following schemas. \nai schema google_ml schema\n\nWhat's next\n-----------\n\n- [Register a model endpoint with model endpoint management](/alloydb/docs/ai/register-model-endpoint).\n\n- [Query using AI powered SQL operators](/alloydb/docs/ai/evaluate-semantic-queries-ai-operators)."]]