Google 深度思维(Google DeepMind)近日正式推出 Gemini Decisions API。该接口由全新的 Gemini Decision 1 模型驱动,旨在支持多模态内容的快速评估与决策。

据官方介绍,Gemini Decision 1 模型能够在单次处理流程中,对文本、图像、音频、视频及 PDF 文件中的最多 1,000 个问题进行并行评估。这些问题类型涵盖是非题、选择题以及基于评分标准的问题。
该 API 的核心功能在于计算多个问题的信心分数(confidence scores),从而帮助用户在文本和多媒体内容中快速进行概率选择。这种机制为定向查询、内容评分或政策规则检查提供了一种具备成本效益的解决方案。
开发者目前可通过 Google AI Studio 获取 API 密钥开始构建应用。官方文档已提供 Python、JavaScript 和 REST 接口的使用指南。
以下代码示例展示了如何使用 Python SDK 调用该 API,针对一张包含液体泄漏的图片执行多项判断任务:
from google import genai
client = genai.Client(http_options={"api_version": "v1beta"})
result = client.decisions.create(
model="gemini-decision-1",
input=[{
"type": "image",
"uri": "https://storage.googleapis.com/generativeai-downloads/images/spill.jpg",
"mime_type": "image/jpeg",
},
{
"type": "text",
"text": "Breakroom counter check before the 9 AM client meeting.",
},
],
questions={
"has_spill": {
"type": "noul",
"instructions": "Is there an uncleaned liquid spill on the counter?",
},
"next_action": {
"type": "choice",
"instructions": "Which cleanup action fits the scene?",
"criteria": {
"wipe_with_cloth": "Small counter spill with a cloth or towel already nearby.",
"dispatch_janitorial": "Large floor hazard, broken glass, or active leak.",
"ready_for_meeting": "Counter is clean and ready.",
},
},
"severity": {
"type": "score",
"instructions": "Rate the severity of the counter mess.",
"criteria": [
"Clean and ready.",
"Minor localized spill.",
"Major spill or safety hazard.",
],
},
},
)




