Skip to content

Commit 73d563f

Browse files
OpenAI node v2 (#3779)
Co-authored-by: Kartik Balasubramanian <22399046+HumanistSerif@users.noreply.github.com>
1 parent 860a811 commit 73d563f

File tree

7 files changed

+199
-17
lines changed

7 files changed

+199
-17
lines changed

docs/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/assistant-operations.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ priority: critical
99

1010
Use this operation to create, delete, list, message, or update an assistant in OpenAI. Refer to [OpenAI](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/index.md) for more information on the OpenAI node itself.
1111

12+
/// note | Assistant operations deprecated in OpenAI node V2
13+
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](https://platform.openai.com/docs/assistants/migration).
14+
///
15+
1216
## Create an Assistant
1317

1418
Use this operation to create a new assistant.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: OpenAI Conversation operations
3+
description: Documentation for the Conversation operations in OpenAI node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information.
4+
contentType: [integration, reference]
5+
priority: critical
6+
---
7+
8+
# OpenAI Conversation operations
9+
10+
Use this operation to create, get, update, or remove a conversation in OpenAI. Refer to [OpenAI](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/index.md) for more information on the OpenAI node itself.
11+
12+
## Create a Conversation
13+
14+
Use this operation to create a new conversation.
15+
16+
Enter these parameters:
17+
18+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai.md).
19+
- **Resource**: Select **Conversation**.
20+
- **Operation**: Select **Create a Conversation**.
21+
- **Messages**: A message input to the model. Messages with the `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role will be assumed to have been generated by the model in previous interactions.
22+
23+
### Options
24+
25+
- **Metadata**: A set of key-value pairs for storing structured information. You can attach up to 16 pairs to an object, which is useful for adding custom data that can be used for searching via the API or in the dashboard.
26+
27+
Refer to [Conversations | OpenAI](https://platform.openai.com/docs/api-reference/conversations/create) documentation for more information.
28+
29+
## Get a Conversation
30+
31+
Use this operation to retrieve an existing conversation.
32+
33+
Enter these parameters:
34+
35+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai.md).
36+
- **Resource**: Select **Conversation**.
37+
- **Operation**: Select **Get Conversation**.
38+
- **Conversation ID**: The ID of the conversation to retrieve.
39+
40+
Refer to [Conversations | OpenAI](https://platform.openai.com/docs/api-reference/conversations/create) documentation for more information.
41+
42+
## Remove a Conversation
43+
44+
Use this operation to remove an existing conversation.
45+
46+
Enter these parameters:
47+
48+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai.md).
49+
- **Resource**: Select **Conversation**.
50+
- **Operation**: Select **Remove Conversation**.
51+
- **Conversation ID**: The ID of the conversation to remove.
52+
53+
Refer to [Conversations | OpenAI](https://platform.openai.com/docs/api-reference/conversations/create) documentation for more information.
54+
55+
## Update a Conversation
56+
57+
Use this operation to update an existing conversation.
58+
59+
Enter these parameters:
60+
61+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai.md).
62+
- **Resource**: Select **Conversation**.
63+
- **Operation**: Select **Update a Conversation**.
64+
- **Conversation ID**: The ID of the conversation to update.
65+
66+
### Options
67+
68+
- **Metadata**: A set of key-value pairs for storing structured information. You can attach up to 16 pairs to an object, which is useful for adding custom data that can be used for searching via the API or in the dashboard.
69+
70+
Refer to [Conversations | OpenAI](https://platform.openai.com/docs/api-reference/conversations/create) documentation for more information.

docs/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/image-operations.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Enter these parameters:
1818
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai.md).
1919
- **Resource**: Select **Image**.
2020
- **Operation**: Select **Analayze Image**.
21-
- **Model**: Select the model you want to use to generate an image.
21+
- **Model**: Select the model you want to use to analyze an image.
2222
- **Text Input**: Ask a question about the image.
2323
- **Input Type**: Select how you'd like to input the image. Options include:
2424
- **Image URL(s)**: Enter the **URL(s)** of the image(s) to analyze. Add multiple URLs in a comma-separated list.
@@ -55,6 +55,30 @@ Enter these parameters:
5555

5656
Refer to [Create image | OpenAI](https://platform.openai.com/docs/api-reference/images/create) documentation for more information.
5757

58+
## Edit an Image
59+
60+
Use this operation to edit an image from a text prompt.
61+
62+
Enter these parameters:
63+
64+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai.md).
65+
- **Resource**: Select **Image**.
66+
- **Operation**: Select **Edit Image**.
67+
- **Model**: Select the model you want to use to generate an image. Supports `dall-e-2` and `gpt-image-1`.
68+
- **Prompt**: Enter the text description of the desired edits to the input image(s).
69+
- **Image(s)**: Add one or more binary fields to include images with your prompt. Each image should be a png, webp, or jpg file less than 50MB. You can provide up to 16 images.
70+
- **Number of Images**: The number of images to generate. Must be between 1 and 10.
71+
- **Size**: The size and dimensions of the generated images (in px).
72+
- **Quality**: The quality of the image that will be generated (auto, low, medium, high, standard). Only supported for `gpt-image-1`.
73+
- **Output Format**: The format in which the generated images are returned (png, webp, or jpg). Only supported for gpt-image-1.
74+
- **Output Compression**: The compression level (0-100%) for the generated images. Only supported for `gpt-image-1` with webp or jpeg output formats.
75+
76+
### Options
77+
- **Background**: Allows to set transparency for the background of the generated image(s). Only supported for `gpt-image-1`.
78+
- **Input Fidelity**: Control how much effort the model will exert to match the style and features of input images. Only supported for `gpt-image-1`.
79+
- **Image Mask**: Name of the binary property that contains the image. A second image whose fully transparent areas (for example, where alpha is zero) shows where the image should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as image.
80+
- **User**: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
81+
5882
## Common issues
5983

6084
For common errors or issues and suggested resolution steps, refer to [Common Issues](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/common-issues.md).

docs/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/index.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Use the OpenAI node to automate work in OpenAI and integrate OpenAI with other a
1313

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

16-
/// note | OpenAI Assistant node
16+
/// note | Previous node versions
1717
The OpenAI node replaces the OpenAI assistant node from version 1.29.0 on.
18+
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](https://platform.openai.com/docs/assistants/migration).
1819
///
1920

2021
/// note | Credentials
@@ -23,18 +24,14 @@ Refer to [OpenAI credentials](/integrations/builtin/credentials/openai.md) for g
2324

2425
## Operations
2526

26-
- **Assistant**
27-
- [**Create an Assistant**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/assistant-operations.md#create-an-assistant)
28-
- [**Delete an Assistant**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/assistant-operations.md#delete-an-assistant)
29-
- [**List Assistants**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/assistant-operations.md#list-assistants)
30-
- [**Message an Assistant**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/assistant-operations.md#message-an-assistant)
31-
- [**Update an Assistant**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/assistant-operations.md#update-an-assistant)
3227
- **Text**
33-
- [**Message a Model**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/text-operations.md#message-a-model)
28+
- [**Generate a Chat Completion**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/text-operations.md#generate-a-chat-completion)
29+
- [**Generate a Model Response**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/text-operations.md#generate-a-model-response)
3430
- [**Classify Text for Violations**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/text-operations.md#classify-text-for-violations)
3531
- **Image**
3632
- [**Analyze Image**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/image-operations.md#analyze-image)
3733
- [**Generate an Image**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/image-operations.md#generate-an-image)
34+
- [**Edit an Image**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/image-operations.md#edit-an-image)
3835
- **Audio**
3936
- [**Generate Audio**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/audio-operations.md#generate-audio)
4037
- [**Transcribe a Recording**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/audio-operations.md#transcribe-a-recording)
@@ -43,6 +40,14 @@ Refer to [OpenAI credentials](/integrations/builtin/credentials/openai.md) for g
4340
- [**Delete a File**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/file-operations.md#delete-a-file)
4441
- [**List Files**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/file-operations.md#list-files)
4542
- [**Upload a File**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/file-operations.md#upload-a-file)
43+
- **Video**
44+
- [**Generate a Video**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/video-operations.md#generate-video)
45+
- **Conversation**
46+
- [**Create a Conversation**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/conversation-operations.md#create-a-conversation)
47+
- [**Get a Conversation**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/conversation-operations.md#get-a-conversation)
48+
- [**Update a Conversation**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/conversation-operations.md#update-a-conversation)
49+
- [**Remove a Conversation**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/conversation-operations.md#remove-a-conversation)
50+
4651

4752
## Templates and examples
4853

@@ -69,10 +74,9 @@ Once you add a tool connection, the OpenAI node becomes a [root node](/glossary.
6974

7075
### Operations that support tool connectors
7176

72-
- **Assistant**
73-
- [**Message an Assistant**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/assistant-operations.md#message-an-assistant)
7477
- **Text**
75-
- [**Message a Model**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/text-operations.md#message-a-model)
78+
- [**Generate a Chat Completion**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/text-operations.md#generate-a-chat-completion)
79+
- [**Generate a Model Response**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/text-operations.md#generate-a-model-response)
7680

7781
## Common issues
7882

0 commit comments

Comments
 (0)