Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,30 @@

n8n dynamically loads models from OpenAI, and you'll only see the models available to your account.

### Use Responses API
OpenAI provides two endpoints for generating output from a model:
- **Chat Completions**: The Chat Completions API endpoint generates a model response from a list of messages that comprise a conversation. The API requires the user to handle conversation state manually, for example by adding a [Simple Memory](docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorybufferwindow/index.md) subnode. For new projects, OpenAI recommends to use the Responses API.

Check failure on line 30 in docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'subnode'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'subnode'?", "location": {"path": "docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md", "range": {"start": {"line": 30, "column": 344}}}, "severity": "ERROR"}
- **Responses**: The Responses API is an agentic loop, allowing the model to call multiple built-in tools within the span of one API request. It also supports persistent conversations by passing a `conversation_id`.

Check failure on line 31 in docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'agentic'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'agentic'?", "location": {"path": "docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md", "range": {"start": {"line": 31, "column": 42}}}, "severity": "ERROR"}

Toggle to **Use Responses API** if you want the model to generate output using the Responses API. Otherwise, the OpenAI Chat Model node will default to using the Chat Completions API.

Refer to the OpenAI documentation for a [comparison of the Chat Completions and Responses APIs](https://platform.openai.com/docs/guides/migrate-to-responses).


### Built-in Tools
The OpenAI Responses API provides a range of [built-in tools](https://platform.openai.com/docs/guides/tools) to enrich the model's response:
The OpenAI Responses API provides a range of [built-in tools](https://platform.openai.com/docs/guides/tools) to enrich the model's response. Toggle to **Use Responses API** if you want the model to have access to the following built-in tools:

- **Web Search**: Allows models to search the web for the latest information before generating a response.
- **MCP Servers**: Allows models to connect to remote MCP servers. Find out more about using remote MCP servers as tools [here](https://platform.openai.com/docs/guides/tools-connectors-mcp).
- **File Search**: Allow models to search your knowledgebase from previously uploaded files for relevant information before generating a response. Refer to the [OpenAI documentation](https://platform.openai.com/docs/guides/tools-file-search) for more information.
- **Code Interpreter**: Allows models to write and run Python code in a sandboxed environment.

## Node options

Use these options to further refine the node's behavior.
/// note | Use with AI Agent node
Built-in tools are only supported when using the OpenAI Chat Model node in combination with the AI Agent node. Built-in tools are not available when using the OpenAI Chat Model node in combination with a Basic LLM Chain node, for example.

Check failure on line 46 in docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [from-microsoft.Contractions] Use 'aren't' instead of 'are not'. Raw Output: {"message": "[from-microsoft.Contractions] Use 'aren't' instead of 'are not'.", "location": {"path": "docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md", "range": {"start": {"line": 46, "column": 127}}}, "severity": "ERROR"}
///

### Base URL
## Node options

Enter a URL here to override the default URL for the API.
Use these options to further refine the node's behavior. The following options are available whether you use the Responses API to generate model output or not.

### Frequency Penalty

Expand All @@ -49,10 +58,6 @@

Enter the maximum number of tokens used, which sets the completion length.

### Response Format

Choose **Text** or **JSON**. **JSON** ensures the model returns valid JSON.

### Presence Penalty

Use this option to control the chances of the model talking about new topics. Higher values increase the chance of the model talking about new topics.
Expand All @@ -73,6 +78,9 @@

Use this option to set the probability the completion should use. Use a lower value to ignore less probable options.

## Additional node options (Responses API only)

Check warning on line 81 in docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [from-write-good.TooWordy] 'Additional' is too wordy. Raw Output: {"message": "[from-write-good.TooWordy] 'Additional' is too wordy.", "location": {"path": "docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md", "range": {"start": {"line": 81, "column": 4}}}, "severity": "WARNING"}
The following, additional options are available when toggling to **Use Responses API**.

Check warning on line 82 in docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [from-write-good.TooWordy] 'additional' is too wordy. Raw Output: {"message": "[from-write-good.TooWordy] 'additional' is too wordy.", "location": {"path": "docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md", "range": {"start": {"line": 82, "column": 16}}}, "severity": "WARNING"}

### Conversation ID
The conversation that this response belongs to. Input items and output items from this response are automatically added to this conversation after this response completes.

Expand All @@ -95,10 +103,7 @@
Choose a response format: Text, JSON Schema, or JSON Object. Use of JSON Schema is recommended, if you want to receive data in JSON format.

### Prompt
Configure the prompt filled with a unique ID, its version, and substitutable variables.

### Reasoning Effort
Control the reasoning level of AI results: Low, Medium, or High.
Configure the prompt filled with a unique ID, its version, and substitutable variables. Prompts are configured via the OpenAI dashboard.

Check warning on line 106 in docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [n8n-styles.via] Consider replacing 'via' with 'using' Raw Output: {"message": "[n8n-styles.via] Consider replacing 'via' with 'using'", "location": {"path": "docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md", "range": {"start": {"line": 106, "column": 112}}}, "severity": "WARNING"}

Check warning on line 106 in docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [from-write-good.Passive] 'are configured' may be passive voice. Use active voice if you can. Raw Output: {"message": "[from-write-good.Passive] 'are configured' may be passive voice. Use active voice if you can.", "location": {"path": "docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md", "range": {"start": {"line": 106, "column": 97}}}, "severity": "WARNING"}

## Templates and examples

Expand Down