OpenAI 助手操作#
使用此操作在 OpenAI 中创建、删除、列表、发消息或更新助手。有关 OpenAI 节点本身的更多信息,请参考 OpenAI。
创建助手#
使用此操作创建新的助手。
输入这些参数:
- 连接凭证:创建或选择现有的 OpenAI 凭证。
- 资源:选择 Assistant。
- 操作:选择 Create an Assistant。
- 模型:选择助手将使用的模型。如果您不确定使用哪个模型,如果需要高智能则尝试
gpt-4o
,如果需要最快速度和最低成本则尝试gpt-4o-mini
。有关更多信息,请参考 Models overview | OpenAI Platform。 - 名称:输入助手的名称。最大长度为 256 个字符。
- 描述:输入助手的描述。最大长度为 512 个字符。
1
A virtual assistant that helps users with daily tasks, including setting reminders, answering general questions, and providing quick information.
- 指令:输入助手使用的系统指令。最大长度为 32,768 个字符。使用此项指定模型在回复中使用的人格。
1
Always respond in a friendly and engaging manner. When a user asks a question, provide a concise answer first, followed by a brief explanation or additional context if necessary. If the question is open-ended, offer a suggestion or ask a clarifying question to guide the conversation. Keep the tone positive and supportive, and avoid technical jargon unless specifically requested by the user.
- Code Interpreter:启用以为助手启用代码解释器,它可以在沙盒环境中编写和执行代码。为需要计算、数据分析或任何基于逻辑的处理的任务启用此工具。
- Knowledge Retrieval:启用以为助手启用知识检索,允许它访问外部源或连接的知识库。有关更多信息,请参考 File Search | OpenAI Platform。
- 文件:选择要为外部知识源上传的文件。使用上传文件操作添加更多文件。
Options#
- Output Randomness (Temperature): Adjust the randomness of the response. The range is between
0.0
(deterministic) and1.0
(maximum randomness). We recommend altering this or Output Randomness (Top P) but not both. Start with a medium temperature (around 0.7) and adjust based on the outputs you observe. If the responses are too repetitive or rigid, increase the temperature. If they’re too chaotic or off-track, decrease it. Defaults to1.0
. - Output Randomness (Top P): Adjust the Top P setting to control the diversity of the assistant's responses. For example,
0.5
means half of all likelihood-weighted options are considered. We recommend altering this or Output Randomness (Temperature) but not both. Defaults to1.0
. - Fail if Assistant Already Exists: If enabled, the operation will fail if an assistant with the same name already exists.
Refer to Create assistant | OpenAI documentation for more information.
删除助手#
Use this operation to delete an existing assistant from your account.
Enter these parameters:
- Credential to connect with: Create or select an existing OpenAI credential.
- Resource: Select Assistant.
- Operation: Select Delete an Assistant.
- Assistant: Select the assistant you want to delete From list or By ID.
Refer to Delete assistant | OpenAI documentation for more information.
列表助手#
Use this operation to retrieve a list of assistants in your organization.
- Credential to connect with: Create or select an existing OpenAI credential.
- Resource: Select Assistant.
- Operation: Select List Assistants.
Options#
- Simplify Output: Turn on to return a simplified version of the response instead of the raw data. This option is enabled by default.
Refer to List assistants | OpenAI documentation for more information.
发消息给助手#
使用此操作向助手发送消息并接收响应。
输入这些参数:
- 连接凭证:创建或选择现有的 OpenAI 凭证。
- 资源:选择 Assistant。
- 操作:选择 Message an Assistant。
- 助手:选择您要发送消息的助手。
- 提示词:输入您要发送给助手的文本提示或消息。
- Connected Chat Trigger Node:自动使用来自前一个节点
chatInput
字段的输入。 - Define Below:通过输入静态文本或使用表达式引用来自前一个节点的数据来手动定义提示词。
- Connected Chat Trigger Node:自动使用来自前一个节点
选项#
- Base URL:输入助手应用于进行 API 请求的基础 URL。此选项对于指导助手使用其他提供 OpenAI 兼容 API 的 LLM 提供商的端点很有用。
- 最大重试次数:指定助手在失败情况下应重试操作的次数。
- 超时:设置助手在超时前应等待响应的最大时间(以毫秒为单位)。使用此选项可防止操作期间的长时间等待。
- 保留原始工具:关闭以移除与助手关联的原始工具。如果您想为此特定操作临时移除工具,请使用此选项。
有关更多信息,请参考 Assistants | OpenAI 文档。
更新助手#
使用此操作更新现有助手的详细信息。
输入这些参数:
- 连接凭证:创建或选择现有的 OpenAI 凭证。
- 资源:选择 Assistant。
- 操作:选择 Update an Assistant。
- 助手:选择您要更新的助手。
选项#
- Code Interpreter:启用以为助手启用代码解释器,它可以在沙盒环境中编写和执行代码。为需要计算、数据分析或任何基于逻辑的处理的任务启用此工具。
- 描述:输入助手的描述。最大长度为 512 个字符。
1
A virtual assistant that helps users with daily tasks, including setting reminders, answering general questions, and providing quick information.
- 指令:输入助手使用的系统指令。最大长度为 32,768 个字符。使用此项指定模型在回复中使用的人格。
1
Always respond in a friendly and engaging manner. When a user asks a question, provide a concise answer first, followed by a brief explanation or additional context if necessary. If the question is open-ended, offer a suggestion or ask a clarifying question to guide the conversation. Keep the tone positive and supportive, and avoid technical jargon unless specifically requested by the user.
- Knowledge Retrieval:启用以为助手启用知识检索,允许它访问外部源或连接的知识库。有关更多信息,请参考 File Search | OpenAI Platform。
- 文件:选择要为外部知识源上传的文件。使用上传文件操作添加更多文件。请注意,这仅更新 Code Interpreter 工具,而不是 File Search 工具。
- 模型:选择助手将使用的模型。如果您不确定使用哪个模型,如果需要高智能则尝试
gpt-4o
,如果需要最快速度和最低成本则尝试gpt-4o-mini
。有关更多信息,请参考 Models overview | OpenAI Platform。 - 名称:输入助手的名称。最大长度为 256 个字符。
- 移除所有自定义工具(函数):启用以从助手中移除所有自定义工具(函数)。
- 输出随机性 (Temperature):调整响应的随机性。范围在
0.0
(确定性)和1.0
(最大随机性)之间。我们建议更改此项或输出随机性 (Top P),但不要同时更改两者。从中等温度(约 0.7)开始,并根据您观察到的输出进行调整。如果响应过于重复或僵化,请增加温度。如果响应过于混乱或偏离主题,请降低温度。默认为1.0
。 - 输出随机性 (Top P):调整 Top P 设置以控制助手响应的多样性。例如,
0.5
意味着考虑所有概率加权选项的一半。我们建议更改此项或输出随机性 (Temperature),但不要同时更改两者。默认为1.0
。
有关更多信息,请参考 Modify assistant | OpenAI 文档。
常见问题#
有关常见错误或问题和建议的解决步骤,请参考常见问题。
此页面是否
微信
🚀 与作者交流
关注公众号

n8n实战笔记
📚 教程 💡 案例 🔧 技巧
📚 教程 💡 案例 🔧 技巧
添加微信

1对1 专业指导
⚡ 快答 🎯 定制 🚀 支持
⚡ 快答 🎯 定制 🚀 支持