AlloyDB AI
是 AlloyDB Omni 內含的一系列功能,可讓您建構企業生成式 AI 應用程式。如要進一步瞭解 AlloyDB 的 ML 功能,請參閱「建構生成式 AI 應用程式」。
AlloyDB Omni 搭配 AlloyDB AI 可讓您查詢遠端 ML 模型,並使用 ML 模型產生的線上預測和文字嵌入。如果您使用 google_ml.predict_row 介面,並在查詢中自行翻譯,AlloyDB Omni 搭配 AlloyDB AI 也能處理其他內容 (例如圖片) 的向量嵌入。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eAlloyDB Omni, including AlloyDB AI, allows users to build enterprise generative AI applications.\u003c/p\u003e\n"],["\u003cp\u003eAlloyDB AI enables querying remote ML models to work with online predictions and text embeddings.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eembedding()\u003c/code\u003e function within AlloyDB AI generates embeddings for text, with \u003ccode\u003earray_dims\u003c/code\u003e showing the dimensions of the resulting array.\u003c/p\u003e\n"],["\u003cp\u003eInstallation of AlloyDB Omni with AlloyDB AI can be verified by creating the \u003ccode\u003egoogle_ml_integration\u003c/code\u003e extension and running a test query with the \u003ccode\u003eembedding\u003c/code\u003e function.\u003c/p\u003e\n"]]],[],null,["# Install AlloyDB Omni with AlloyDB AI\n\nSelect a documentation version: 15.5.4keyboard_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\n\n| **Note:** Your use of AlloyDB Omni is subject to the agreement between you and Google that governs Google Cloud offerings. If you do not have a Google Cloud account, or have not otherwise entered into an agreement with Google that governs Google Cloud offerings, please do not proceed or download this software until you have done so. To create a Google Cloud account, see [the Google Cloud homepage](/docs/get-started).\n\n\u003cbr /\u003e\n\nThis page shows you how to install AlloyDB Omni and integrate\nAlloyDB AI in it.\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 ML functionality of AlloyDB, see\n[Build generative AI applications](/alloydb/docs/vertex-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 google_ml_integration CASCADE;\n\n SELECT array_dims(embedding( 'textembedding-gecko@001', 'AlloyDB AI')::real[]);\n array_dims\n\nThe output looks similar to the following: \n\n [1:768]\n (1 row)\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 pre-registered `textembedding-gecko` 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.5.4/docs/run-connect)\n- [Manage AlloyDB Omni](/alloydb/omni/15.5.4/docs/manage)\n- [Build generative AI applications using AlloyDB AI](/alloydb/omni/15.5.4/docs/model-endpoint-overview)\n- [Register and call remote AI models](/alloydb/omni/15.5.4/docs/model-endpoint-overview)"]]