> ## 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.

# OpenAIChatNode - ComfyUI Built-in Node Documentation

> Complete documentation for the OpenAIChatNode node in ComfyUI. Learn its inputs, outputs, parameters and usage.

此节点从 OpenAI 模型生成文本回复。它将您的文本提示（以及可选的图像或文件）发送到 OpenAI 模型，并返回生成的文本回复。

## 输入

| 参数      | 描述                                     | 数据类型                 | 是否必填 | 范围              |
| ------- | -------------------------------------- | -------------------- | ---- | --------------- |
| `提示词`   | 输入到模型的文本，用于生成回复（默认值：空）                 | STRING               | 是    | -               |
| `保持上下文` | 此参数已弃用，无任何效果（默认值：False）                | BOOLEAN              | 是    | -               |
| `模型`    | 用于生成回复的模型                              | COMBO                | 是    | 多个可用的 OpenAI 模型 |
| `图像`    | 可选的图像，用作模型的上下文。如需包含多张图像，可使用批量图像节点      | IMAGE                | 否    | -               |
| `文件`    | 可选的文件，用作模型的上下文。接受来自 OpenAI 聊天输入文件节点的输入 | OPENAI\_INPUT\_FILES | 否    | -               |
| `高级设置`  | 模型的可选配置。接受来自 OpenAI 聊天高级选项节点的输入        | OPENAI\_CHAT\_CONFIG | 否    | -               |

## 输出

| 输出名称          | 描述               | 数据类型   |
| ------------- | ---------------- | ------ |
| `output_text` | OpenAI 模型生成的文本回复 | STRING |

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

***

**Source fingerprint (SHA-256):** `ea66b58b23305b0d97bfc76cc39cfdfe8e01b70edcbfd60c2c640a07ad507ee6`
