Skip to content

Commit 83ee861

Browse files
ayatnkwfreakwriter
andauthored
Doc-1022 Update OpenAI node doc (n8n-io#2446)
Co-authored-by: Kate Mueller <[email protected]>
1 parent 3617a12 commit 83ee861

File tree

8 files changed

+403
-30
lines changed

8 files changed

+403
-30
lines changed

docs/integrations/builtin/app-nodes/n8n-nodes-base.apitemplateio.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Refer to [APITemplate.io credentials](/integrations/builtin/credentials/apitempl
1818
## Operations
1919

2020
* Account
21-
* Get
21+
* Get
2222
* Image
23-
* Create
23+
* Create
2424
* PDF
25-
* Create
25+
* Create
2626

2727
## Templates and examples
2828

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
#https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
3+
title: OpenAI Assistant operations
4+
description: Documentation for the Assistant operations in OpenAI node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information.
5+
contentType: integration
6+
priority: critical
7+
---
8+
9+
# OpenAI Assistant operations
10+
11+
Use this operation to create, delete, list, message, or update an assistant in OpenAI. Refer to [OpenAI](/integrations/builtin/app-nodes/n8n-nodes-base.openai/) for more information on the OpenAI node itself.
12+
13+
## Create an Assistant
14+
15+
Use this operation to create a new assistant.
16+
17+
Enter these parameters:
18+
19+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai/).
20+
- **Resource**: Select **Assistant**.
21+
- **Operation**: Select **Create an Assistant**.
22+
- **Model**: Select the model that the assistant will use. If you’re not sure which model to use, try `gpt-4o` if you need high intelligence or `gpt-4o-mini` if you need the fastest speed and lowest cost. Refer to [Models overview | OpenAI Platform](https://platform.openai.com/docs/models){:target=_blank .external-link} for more information.
23+
- **Name**: Enter the name of the assistant. The maximum length is 256 characters.
24+
- **Description**: Enter the description of the assistant. The maximum length is 512 characters.
25+
```
26+
A virtual assistant that helps users with daily tasks, including setting reminders, answering general questions, and providing quick information.
27+
```
28+
- **Instructions**: Enter the system instructions that the assistant uses. The maximum length is 32,768 characters. Use this to specify the persona used by the model in its replies.
29+
```
30+
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.
31+
```
32+
- **Code Interpreter**: Turn on to enable the code interpreter for the assistant, where it can write and execute code in a sandbox environment. Enable this tool for tasks that require computations, data analysis, or any logic-based processing.
33+
- **Knowledge Retrieval**: Turn on to enable knowledge retrieval for the assistant, allowing it to access external sources or a connected knowledge base. Refer to [File Search | OpenAI Platform](https://platform.openai.com/docs/assistants/tools/file-search){:target=_blank .external-link} for more information.
34+
- **Files**: Select a file to upload for your external knowledge source. Use **Upload a File** operation to add more files.
35+
36+
### Options
37+
38+
- **Output Randomness (Temperature)**: Adjust the randomness of the response. The range is between `0.0` (deterministic) and `1.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 to `1.0`.
39+
- **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 to `1.0`.
40+
- **Fail if Assistant Already Exists**: If enabled, the operation will fail if an assistant with the same name already exists.
41+
42+
Refer to [Create assistant | OpenAI](https://platform.openai.com/docs/api-reference/assistants/createAssistant){:target=_blank .external-link} documentation for more information.
43+
44+
## Delete an Assistant
45+
46+
Use this operation to delete an existing assistant from your account.
47+
48+
Enter these parameters:
49+
50+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai/).
51+
- **Resource**: Select **Assistant**.
52+
- **Operation**: Select **Delete an Assistant**.
53+
- **Assistant**: Select the assistant you want to delete **From list** or **By ID**.
54+
55+
Refer to [Delete assistant | OpenAI](https://platform.openai.com/docs/api-reference/assistants/deleteAssistant){:target=_blank .external-link} documentation for more information.
56+
57+
## List Assistants
58+
59+
Use this operation to retrieve a list of assistants in your organization.
60+
61+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai/).
62+
- **Resource**: Select **Assistant**.
63+
- **Operation**: Select **List Assistants**.
64+
65+
### Options
66+
67+
- **Simplify Output**: Turn on to return a simplified version of the response instead of the raw data. This option is enabled by default.
68+
69+
Refer to [List assistants | OpenAI](https://platform.openai.com/docs/api-reference/assistants/listAssistants){:target=_blank .external-link} documentation for more information.
70+
71+
## Message an Assistant
72+
73+
Use this operation to send a message to an assistant and receive a response.
74+
75+
Enter these parameters:
76+
77+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai/).
78+
- **Resource**: Select **Assistant**.
79+
- **Operation**: Select **Message an Assistant**.
80+
- **Assistant**: Select the assistant you want to message.
81+
- **Prompt**: Enter the text prompt or message that you want to send to the assistant.
82+
- **Take from Previous Node Automatically**: Automatically use the input from a previous node's `chatInput` field.
83+
- **Define Below**: Manually define the prompt by entering static text or using an expression to reference data from previous nodes.
84+
85+
### Options
86+
87+
- **Base URL**: Enter the base URL that the assistant should use for making API requests. This option is useful for directing the assistant to use endpoints provided by other LLM providers that offer an OpenAI-compatible API.
88+
- **Max Retries**: Specify the number of times the assistant should retry an operation in case of failure.
89+
- **Timeout**: Set the maximum amount of time in milliseconds, that the assistant should wait for a response before timing out. Use this option to prevent long waits during operations.
90+
- **Preserve Original Tools**: Turn off to remove the original tools associated with the assistant. Use this if you want to temporarily remove tools for this specific operation.
91+
92+
Refer to [Assistants | OpenAI](https://platform.openai.com/docs/api-reference/assistants){:target=_blank .external-link} documentation for more information.
93+
94+
## Update an Assistant
95+
96+
Use this operation to update the details of an existing assistant.
97+
98+
Enter these parameters:
99+
100+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai/).
101+
- **Resource**: Select **Assistant**.
102+
- **Operation**: Select **Update an Assistant**.
103+
- **Assistant**: Select the assistant you want to update.
104+
105+
### Options
106+
107+
- **Code Interpreter**: Turn on to enable the code interpreter for the assistant, where it can write and execute code in a sandbox environment. Enable this tool for tasks that require computations, data analysis, or any logic-based processing.
108+
- **Description**: Enter the description of the assistant. The maximum length is 512 characters.
109+
```
110+
A virtual assistant that helps users with daily tasks, including setting reminders, answering general questions, and providing quick information.
111+
```
112+
- **Instructions**: Enter the system instructions that the assistant uses. The maximum length is 32,768 characters. Use this to specify the persona used by the model in its replies.
113+
```
114+
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.
115+
```
116+
- **Knowledge Retrieval**: Turn on to enable knowledge retrieval for the assistant, allowing it to access external sources or a connected knowledge base. Refer to [File Search | OpenAI Platform](https://platform.openai.com/docs/assistants/tools/file-search){:target=_blank .external-link} for more information.
117+
- **Files**: Select a file to upload for your external knowledge source. Use [**Upload a File**](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/file-operations.md#upload-a-file) operation to add more files.
118+
- **Model**: Select the model that the assistant will use. If you’re not sure which model to use, try `gpt-4o` if you need high intelligence or `gpt-4o-mini` if you need the fastest speed and lowest cost. Refer to [Models overview | OpenAI Platform](https://platform.openai.com/docs/models){:target=_blank .external-link} for more information.
119+
- **Name**: Enter the name of the assistant. The maximum length is 256 characters.
120+
- **Remove All Custom Tools (Functions)**: Turn on to remove all custom tools (functions) from the assistant.
121+
- **Output Randomness (Temperature)**: Adjust the randomness of the response. The range is between `0.0` (deterministic) and `1.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 to `1.0`.
122+
- **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 to `1.0`.
123+
124+
Refer to [Modify assistant | OpenAI](https://platform.openai.com/docs/api-reference/assistants/modifyAssistant){:target=_blank .external-link} documentation for more information.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
#https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
3+
title: OpenAI Audio operations
4+
description: Documentation for the Audio operations in OpenAI node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information.
5+
contentType: integration
6+
priority: critical
7+
---
8+
9+
# OpenAI Audio operations
10+
11+
Use this operation to generate an audio, or transcribe or translate a recording in OpenAI. Refer to [OpenAI](/integrations/builtin/app-nodes/n8n-nodes-base.openai/) for more information on the OpenAI node itself.
12+
13+
## Generate Audio
14+
15+
Use this operation to create audio from a text prompt.
16+
17+
Enter these parameters:
18+
19+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai/).
20+
- **Resource**: Select **Audio**.
21+
- **Operation**: Select **Generate Audio**.
22+
- **Model**: Select the model you want to use to generate the audio. Refer to [TTS | OpenAI](https://platform.openai.com/docs/models/tts){:target=_blank .external-link} for more information.
23+
- **TTS-1**: Use this to optimize for speed.
24+
- **TTS-1-HD**: Use this to optimize for quality.
25+
- **Text Input**: Enter the text to generate the audio for. The maximum length is 4096 characters.
26+
- **Voice**: Select a voice to use when generating the audio. Listen to the previews of the voices in [Text to speech guide | OpenAI](https://platform.openai.com/docs/guides/text-to-speech/quickstart){:target=_blank .external-link}.
27+
28+
### Options
29+
30+
- **Response Format**: Select the format for the audio response. Choose from **MP3** (default), **OPUS**, **AAC**, **FLAC**, **WAV**, and **PCM**.
31+
- **Audio Speed**: Enter the speed for the generated audio from a value from `0.25` to `4.0`. Defaults to `1`.
32+
- **Put Output in Field**: Defaults to `data`. Enter the name of the output field to put the binary file data in.
33+
34+
Refer to [Create speech | OpenAI](https://platform.openai.com/docs/api-reference/audio/createSpeech){:target=_blank .external-link} documentation for more information.
35+
36+
## Transcribe a Recording
37+
38+
Use this operation to transcribe audio into text. OpenAI API limits the size of the audio file to 25 MB. OpenAI will use the `whisper-1` model by default.
39+
40+
Enter these parameters:
41+
42+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai/).
43+
- **Resource**: Select **Audio**.
44+
- **Operation**: Select **Transcribe a Recording**.
45+
- **Input Data Field Name**: Defaults to `data`. Enter the name of the binary property that contains the audio file in one of these formats: `.flac`, `.mp3`, `.mp4`, `.mpeg`, `.mpga`, `.m4a`, `.ogg`, `.wav`, or `.webm`.
46+
47+
### Options
48+
49+
- **Language of the Audio File**: Enter the language of the input audio in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes){:target=_blank .external-link}. Use this option to improve accuracy and latency.
50+
- **Output Randomness (Temperature)**: Defaults to `1.0`. Adjust the randomness of the response. The range is between `0.0` (deterministic) and `1.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.
51+
52+
Refer to [Create transcription | OpenAI](https://platform.openai.com/docs/api-reference/audio/createTranscription){:target=_blank .external-link} documentation for more information.
53+
54+
## Translate a Recording
55+
56+
Use this operation to translate audio into English. OpenAI API limits the size of the audio file to 25 MB. OpenAI will use the `whisper-1` model by default.
57+
58+
Enter these parameters:
59+
60+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai/).
61+
- **Resource**: Select **Audio**.
62+
- **Operation**: Select **Translate a Recording**.
63+
- **Input Data Field Name**: Defaults to `data`. Enter the name of the binary property that contains the audio file in one of these formats: `.flac`, `.mp3`, `.mp4`, `.mpeg`, `.mpga`, `.m4a`, `.ogg`, `.wav`, or `.webm`.
64+
65+
### Options
66+
67+
- **Output Randomness (Temperature)**: Defaults to `1.0`. Adjust the randomness of the response. The range is between `0.0` (deterministic) and `1.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.
68+
69+
Refer to [Create transcription | OpenAI](https://platform.openai.com/docs/api-reference/audio/createTranscription){:target=_blank .external-link} documentation for more information.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
#https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
3+
title: OpenAI File operations
4+
description: Documentation for the File operations in OpenAI node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information.
5+
contentType: integration
6+
priority: critical
7+
---
8+
9+
# OpenAI File operations
10+
11+
Use this operation to create, delete, list, message, or update a file in OpenAI. Refer to [OpenAI](/integrations/builtin/app-nodes/n8n-nodes-base.openai/) for more information on the OpenAI node itself.
12+
13+
## Delete a File
14+
15+
Use this operation to delete a file from the server.
16+
17+
Enter these parameters:
18+
19+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai/).
20+
- **Resource**: Select **File**.
21+
- **Operation**: Select **Delete a File**.
22+
- **File**: Enter the ID of the file to use for this operation or select the file name from the dropdown.
23+
24+
Refer to [Delete file | OpenAI](https://platform.openai.com/docs/api-reference/files/delete){:target=_blank .external-link} documentation for more information.
25+
26+
## List Files
27+
28+
Use this operation to list files that belong to the user's organization.
29+
30+
Enter these parameters:
31+
32+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai/).
33+
- **Resource**: Select **File**.
34+
- **Operation**: Select **List Files**.
35+
36+
### Options
37+
38+
- **Purpose**: Use this to only return files with the given purpose. Use **Assistants** to return only files related to Assistants and Message operations. Use **Fine-Tune** for files related to [Fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning){:target=_blank .external-link}.
39+
40+
Refer to [List files | OpenAI](https://platform.openai.com/docs/api-reference/files/list) documentation for more information.
41+
42+
## Upload a File
43+
44+
Use this operation to upload a file. This can be used across various operations.
45+
46+
Enter these parameters:
47+
48+
- **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai/).
49+
- **Resource**: Select **File**.
50+
- **Operation**: Select **Upload a File**.
51+
- **Input Data Field Name**: Defaults to `data`. Enter the name of the binary property which contains the file. The size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants.
52+
53+
54+
### Options
55+
56+
- **Purpose**: Enter the intended purpose of the uploaded file. Use **Assistants** for files associated with Assistants and Message operations. Use **Fine-Tune** for [Fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning){:target=_blank .external-link}.
57+
58+
Refer to [Upload file | OpenAI](https://platform.openai.com/docs/api-reference/files/create){:target=_blank .external-link} documentation for more information.

0 commit comments

Comments
 (0)