Se você tiver problemas ao executar os comandos anteriores ou se a extensão não for atualizada para a versão 1.4.3 depois de executar os comandos anteriores, entre em contato com o suporte do AlloyDB.
Depois de verificar se a versão está atualizada, instale a funcionalidade de prévia
executando o procedimento upgrade_to_preview_version:
Acessar dados no Cloud Storage para gerar incorporações multimodais
Para gerar incorporações multimodais, consulte o conteúdo no Cloud Storage usando um URI gs://.
Acesse o conteúdo do Cloud Storage usando o agente de serviço da Vertex AI do projeto atual. Por padrão, o agente de serviço da Vertex AI já tem permissão para acessar o bucket no mesmo projeto.
Para mais informações, consulte o índice de papéis e permissões do IAM.
Para acessar dados em um bucket do Cloud Storage em outro projeto do Google Cloud ,
execute o seguinte comando da CLI gcloud para conceder o papel Leitor de objetos do Storage (roles/storage.objectViewer) ao agente de serviço da Vertex AI do seu
projeto do AlloyDB.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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)."]]