Skip to content

OpenAI 节点#

¥OpenAI node

使用 OpenAI 节点实现 OpenAI 中的自动化工作,并将 OpenAI 与其他应用集成。n8n 内置支持多种 OpenAI 功能,包括创建图片和助手,以及与模型聊天。

¥Use the OpenAI node to automate work in OpenAI and integrate OpenAI with other applications. n8n has built-in support for a wide range of OpenAI features, including creating images and assistants, as well as chatting with models.

本页列出了 OpenAI 节点支持的操作列表以及更多资源的链接。

¥On this page, you'll find a list of operations the OpenAI node supports and links to more resources.

Previous node versions

从 1.29.0 版本开始,OpenAI 节点取代了 OpenAI 助手节点。n8n 版本 1.117.0 引入了支持 OpenAI Responses API 的 OpenAI 节点 V2,并移除了对 即将弃用的 Assistants API 的支持。

¥The OpenAI node replaces the OpenAI assistant node from version 1.29.0 on. n8n version 1.117.0 introduces V2 of the OpenAI node that supports the OpenAI Responses API and removes support for the to-be-deprecated Assistants API.

Credentials

请参阅 OpenAI 凭证 以了解有关设置身份验证的指导。

¥Refer to OpenAI credentials for guidance on setting up authentication.

操作#

¥Operations

  • 文本

¥Text

¥Image

¥Audio

¥File

¥Video

¥Conversation

模板和示例#

¥Templates and examples

Template widget placeholder.

相关资源#

¥Related resources

有关服务的更多信息,请参阅 OpenAI 文档

¥Refer to OpenAI's documentation for more information about the service.

有关助手工作原理的更多信息,请参阅 OpenAI 助手文档

¥Refer to OpenAI's assistants documentation for more information about how assistants work.

有关处理速率限制的帮助,请参阅 速率限制处理

¥For help dealing with rate limits, refer to Handling rate limits.

What to do if your operation isn't supported#

If this node doesn't support the operation you want to do, you can use the HTTP Request node to call the service's API.

You can use the credential you created for this service in the HTTP Request node:

  1. In the HTTP Request node, select Authentication > Predefined Credential Type.
  2. Select the service you want to connect to.
  3. Select your credential.

Refer to Custom API operations for more information.

使用带有 OpenAI 助手的工具#

¥Using tools with OpenAI assistants

某些操作允许你连接工具。工具 类似于插件,你的 AI 可以使用它们来访问额外的上下文或资源。

¥Some operations allow you to connect tools. Tools act like addons that your AI can use to access extra context or resources.

选择“工具”连接器以浏览可用工具并添加它们。

¥Select the Tools connector to browse the available tools and add them.

添加工具连接后,OpenAI 节点将变为 根节点,从而可以与工具 sub-nodes 组成 集群节点。请参阅 节点类型 了解有关集群节点和根节点的更多信息。

¥Once you add a tool connection, the OpenAI node becomes a root node, allowing it to form a cluster node with the tools sub-nodes. See Node types for more information on cluster nodes and root nodes.

支持工具连接器的操作#

¥Operations that support tool connectors

  • 文本

¥Text

常见问题#

¥Common issues

有关常见问题或建议的解决方案,请参阅 常见问题

¥For common questions or issues and suggested solutions, refer to Common issues.