Nesta página, mostramos como instalar o AlloyDB Omni e integrar o
AlloyDB AI.
O AlloyDB AI
é um pacote de recursos incluídos no AlloyDB Omni que permitem
criar aplicativos empresariais de IA generativa. Para mais informações sobre a funcionalidade de IA/ML do AlloyDB, consulte Criar aplicativos de IA generativa.
Com o AlloyDB Omni e o AlloyDB AI, é possível consultar modelos remotos de ML para trabalhar com previsões on-line e embeddings de texto gerados por modelos de ML. O AlloyDB Omni com o AlloyDB AI também pode processar embeddings de vetores de outros conteúdos, como uma imagem, por exemplo, se você usar a interface google_ml.predict_row e fizer a tradução por conta própria na consulta.
Com base em onde você quer instalar o AlloyDB Omni com a IA do AlloyDB, selecione uma das seguintes opções:
Verificar a instalação do AlloyDB Omni com a IA do AlloyDB
Para verificar se a instalação foi bem-sucedida e usa a previsão do modelo, digite o seguinte:
Na consulta anterior, a chamada embedding() gera embeddings para o texto de entrada AlloyDB AI.
array_dims retorna as dimensões da matriz retornada por embedding().
Como o modelo text-embedding-005 retorna uma saída com 768 dimensões, a saída é [768].
[[["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."],[[["\u003cp\u003eAlloyDB Omni includes AlloyDB AI, a suite of features for building enterprise generative AI applications.\u003c/p\u003e\n"],["\u003cp\u003eAlloyDB Omni with AlloyDB AI enables querying remote ML models for online predictions and text embeddings.\u003c/p\u003e\n"],["\u003cp\u003eYou can install AlloyDB Omni with AlloyDB AI on a single-server Kubernetes GDC air-gapped setup.\u003c/p\u003e\n"],["\u003cp\u003eInstallation verification involves creating the \u003ccode\u003egoogle_ml_integration\u003c/code\u003e extension and using the \u003ccode\u003eembedding()\u003c/code\u003e function to test model predictions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eembedding()\u003c/code\u003e function generates vector embeddings for input text, with the output array dimensions reflecting the model's specifications, like \u003ccode\u003etext-embedding-005\u003c/code\u003e returning 768 dimensions.\u003c/p\u003e\n"]]],[],null,["# Install AlloyDB AI in AlloyDB Omni\n\nSelect a documentation version: 15.7.1keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/install-with-alloydb-ai)\n- [16.8.0](/alloydb/omni/16.8.0/docs/install-with-alloydb-ai)\n- [16.3.0](/alloydb/omni/16.3.0/docs/install-with-alloydb-ai)\n- [15.12.0](/alloydb/omni/15.12.0/docs/install-with-alloydb-ai)\n- [15.7.1](/alloydb/omni/15.7.1/docs/install-with-alloydb-ai)\n- [15.7.0](/alloydb/omni/15.7.0/docs/install-with-alloydb-ai)\n- [15.5.5](/alloydb/omni/15.5.5/docs/install-with-alloydb-ai)\n- [15.5.4](/alloydb/omni/15.5.4/docs/install-with-alloydb-ai)\n- [15.5.2](/alloydb/omni/15.5.2/docs/install-with-alloydb-ai)\n\n\u003cbr /\u003e\n\nThis page shows you how to install AlloyDB Omni and integrate\nAlloyDB AI.\n\n[AlloyDB AI](https://cloud.google.com/alloydb/ai)\nis a suite of features included with AlloyDB Omni that let you\nbuild enterprise generative AI applications. For more information about the\nAI/ML functionality of AlloyDB, see\n[Build generative AI applications](/alloydb/omni/15.7.1/docs/ai/overview-ai).\n\nAlloyDB Omni with AlloyDB AI lets you query remote ML models to work with online predictions and text embeddings generated from ML models. AlloyDB Omni with AlloyDB AI can also process vector embeddings from other content such as an image, for example, if you use the `google_ml.predict_row` interface and do the translation yourself in the query.\n\nBased on where you want to install AlloyDB Omni with AlloyDB AI, select one of the following options: \nSingle-server Kubernetes GDC air-gapped\n\nVerify AlloyDB Omni with AlloyDB AI installation\n------------------------------------------------\n\nTo verify your installation is successful and uses model prediction, enter the following: \n\n CREATE EXTENSION IF NOT EXISTS google_ml_integration CASCADE;\n\n SELECT array_dims(embedding('text-embedding-005', 'AlloyDB AI')::real[]);\n\nThe output looks similar to the following: \n\n array_dims\n ------------\n [1:768]\n (1 row) \n\n| **Note:** Vertex AI model support is governed by Vertex AI model versioning and lifecycle guidelines. For more information about stable versions, see [Model versions and lifecycle](/vertex-ai/generative-ai/docs/learn/model-versions).\n\nIn the previous query, the `embedding()` call generates embeddings for the input text `AlloyDB AI`.\n`array_dims` returns the dimensions of the array returned by `embedding()`.\nSince the `text-embedding-005` model returns an output with 768 dimensions, the output is `[768]`.\n\nWhat's next\n-----------\n\n- [Run and connect to AlloyDB Omni](/alloydb/omni/15.7.1/docs/run-connect)\n- [Manage AlloyDB Omni](/alloydb/omni/15.7.1/docs/manage)\n- [Build generative AI applications using AlloyDB AI](/alloydb/omni/15.7.1/docs/ai/overview-ai)\n- [Register and call remote AI models](/alloydb/omni/15.7.1/docs/ai/register-model-endpoint)"]]