nœuds / builtin / ai / aidependencies / llm
Chat OpenAI
Connect an OpenAI chat model to AI nodes.
Ce contenu n’est pas encore disponible dans votre langue.
Give an AI node access to OpenAI’s GPT models, using your own OpenAI API key.
What it does
Section titled “What it does”Chat OpenAI is a model you plug into the Model slot of an AI node, such as the Tools Agent or Basic LLM Chain. It does not run on its own and has no output. When the AI node runs, it sends its messages to OpenAI with your key and gets the reply back.
- Temperature is 0 when you leave it empty, so answers are focused and repeatable.
- Replies are capped at Max Tokens (4096 by default).
- A failed request is retried up to Max Retries times (2 by default). A request that gets no answer within 60 seconds fails.
When to use it
Section titled “When to use it”- General writing, summarising, extracting and classifying with a GPT model.
- An agent that calls tools: connect it to the Tools Agent.
- You already have an OpenAI account with credit.
If your company uses OpenAI models through Microsoft Azure, use Chat Azure OpenAI instead.
Inputs and settings
Section titled “Inputs and settings”| Réglage | Type | Ce que cela fait |
|---|---|---|
| Model (obligatoire) | Text | The model to use. |
| Authentication (obligatoire) | Credential | Use a Bearer Token. |
| Options | Group | The options to use with the model. |
| Options › Temperature | Number | The temperature to use for the model. |
| Options › Max Retries | Number | The maximum number of retries to use for the model. Par défaut : 2 |
| Options › Max Tokens | Number | The most tokens the model may generate in one reply. Defaults to 4096, which keeps providers from reserving credit for the whole output window. Par défaut : 4096 |
Type the Model id exactly as OpenAI names it, for example gpt-4o-mini or gpt-4o. Your account must have access to that model.
Outputs
Section titled “Outputs”This node has no output port. It plugs into a slot on another node instead of passing items along.
- Model slot of Tools Agent, Q&A Agent, RAG Agent, Basic LLM Chain, Indexer, Text Classifier, Sentiment Analysis, Summarization, Information Extractor, Guardrails, Auto-fixing Output Parser
The AI node you connect it to produces the output. Chat OpenAI only decides which model answers.
Dependencies and credentials
Section titled “Dependencies and credentials”- Authentication (connection): required. See Connect OpenAI.
In Authentication, use a Bearer Token credential that holds your OpenAI API key. Create the key on the API keys page of the OpenAI platform (platform.openai.com/api-keys). See Create a credential.
Example workflow
Section titled “Example workflow”- A Context Menu trigger on the page.
- Get All Text with Output field name
pageText. - Summarization with Text
{{ $input.pageText }}and Max words80, with Chat OpenAI in its Model slot (Modelgpt-4o-mini). - Browser Notification with Message
{{ $input.summary }}.
Common issues
Section titled “Common issues”- “Model parameter is required and cannot be empty”. Fill in Model.
- An “Incorrect API key” or 401 error. The key is wrong or revoked. Create a new key and update the credential.
- A 429 or “quota” error. Your OpenAI account is out of credit or over its rate limit. Add credit or wait, then run again.
- The answer stops mid-sentence. It hit Max Tokens. Raise it under Options.
Related nodes
Section titled “Related nodes”- Chat Azure OpenAI: the same models, hosted on Azure.
- OpenAI Embeddings: OpenAI vectors for a knowledge base.
- Basic LLM Chain: send one prompt and get a reply.
- Tools Agent: an agent that can use tools and memory.