Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, descrevemos como invocar previsões usando funções dos namespaces public e google_ml. A extensão google_ml_integration inclui funções de previsão para esses namespaces.
É possível usar a função ml_predict_row() no esquema public com qualquer modelo genérico hospedado na Vertex AI sem registrar o endpoint. A função google_ml.predict_row() no esquema google_ml pode ser usada com qualquer modelo registrado no gerenciamento de endpoints de modelo.
Para invocar previsões, selecione um dos seguintes esquemas.
[[["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-02 UTC."],[[["\u003cp\u003eAlloyDB allows online predictions within SQL code using the \u003ccode\u003egoogle_ml.predict_row()\u003c/code\u003e function.\u003c/p\u003e\n"],["\u003cp\u003eBefore invoking predictions, you must integrate your database with Vertex AI and grant users permission to execute \u003ccode\u003egoogle_ml.predict_row()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egoogle_ml.predict_row()\u003c/code\u003e function requires you to specify a Vertex AI Model Garden model or a Vertex AI model endpoint with accessible IAM permissions.\u003c/p\u003e\n"],["\u003cp\u003eThe format of the initial argument in \u003ccode\u003egoogle_ml.predict_row()\u003c/code\u003e varies depending on whether you are using a Vertex AI Model Garden model or a Vertex AI endpoint.\u003c/p\u003e\n"],["\u003cp\u003eYou can utilize the \u003ccode\u003ejson_build_object()\u003c/code\u003e function with \u003ccode\u003egoogle_ml.predict_row()\u003c/code\u003e to format function parameters, including using database content as input.\u003c/p\u003e\n"]]],[],null,["# Invoke predictions\n\nThis page describes how to invoke predictions using functions from the `public` and `google_ml` namespaces. The `google_ml_integration` extension includes prediction functions for these namespaces.\n\nYou can use the `ml_predict_row()` function in the `public` schema with any generic model hosted in Vertex AI without registering the endpoint. The `google_ml.predict_row()` function in the `google_ml` schema can be used with any model that has been [registered with Model endpoint management](/alloydb/docs/ai/register-model-endpoint).\n\nTo invoke predictions, select one of the following schemas. \npublic schema google_ml schema\n\nWhat's next\n-----------\n\n- [Learn how to build a smart shopping assistant with AlloyDB, pgvector, and model endpoint management](https://codelabs.developers.google.com/smart-shop-agent-alloydb#0)."]]