> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Gemini 决策（选择） - ComfyUI Built-in Node Documentation

> 为你连接的文本、图像、音频或视频，从你自己提供的选项中挑选一个，并返回被选中的选项、其位置和置信度。

为你连接的文本、图像、音频或视频，从你自己提供的选项中挑选一个，并返回被选中的选项、其位置和置信度。将 `choice` 连接到 Branch 节点（其输入携带相同的选项名称），或基于 `option_index` 进行路由。一个 Branch 节点最多接受 32 个输入，因此对于更大的选项集，请使用 `option_index` 进行路由。

## 输入

| 参数 | 描述 | 数据类型 | 必需 | 范围 |
| - | - | - | - | - |
| `model` | 要使用的模型（默认：`"gemini-decision-1"`）。 | COMBO | 是 | `"gemini-decision-1"` |
| `question` | 选项所回答的问题，最多 5000 个字符（默认：“What style is the image?”）。 | STRING | 是 | 1 到 5000 个字符 |
| `options` | 每行一个选项，按输入原样使用，每个最多 128 个字符。为不适合任何选项的输入添加一个选项，例如 `other`（默认：`photo`、`illustration`、`3d render`、`anime`、`sketch`、`other`）。 | STRING | 是 | 2 到 255 个选项 |
| `images` | 要分类的图像，在可增长槽位（`image_1` ... `image_16`）中最多 16 张。批处理图像按每张图像计一次。 | IMAGE | 否 | 最多 16 张图像 |
| `audio` | 要分类的音频片段。 | AUDIO | 否 | - |
| `video` | 要分类的视频片段。 | VIDEO | 否 | - |
| `text` | 问题所针对的文本，例如提示词或 LLM 响应，最多 20000 个字符。 | STRING | 否 | 最多 20000 个字符 |

至少提供 2 个、最多 255 个选项，且不得重复列出任何选项；否则节点会报错。至少连接 `text`、`images`、`audio` 或 `video` 中的一项，并在问题中为多张图像分别命名为 `image_1`、`image_2` 等。

## 输出

| 输出名称 | 描述 | 数据类型 |
| - | - | - |
| `choice` | 被选中的选项，与 `options` 中所写完全一致。 | STRING |
| `option_index` | 被选中选项在 `options` 中的位置，从 0 开始。 | INT |
| `confidence` | 对该选择的置信度，介于 0 和 1 之间。 | FLOAT |

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/GeminiDecisionChoice/zh.md)

***

**Source fingerprint (SHA-256):** `200c63a9197cd95ba0a21da88c5f3117014b37b0651541094a775219381afe43`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.