Node Documentation

ChatGPT Node

Send prompts to OpenAI's ChatGPT API and use the response dynamically in your flow.

Overview

Send prompts to OpenAI's ChatGPT API and use the response dynamically in your flow.

Category: AI

Tutorial: Start interactive node tutorial

Configurable properties

LabelPropertyTypeDefaultDescription
System promptsystemPrompttextarea""The system prompt
User promptuserPrompttextarea""The user prompt with optional handlebar variables
Modelmodelselect"gpt-4.1-mini"Specify the model to use
Collect and send historymanageHistorycheckboxtrueIf checked the node will manage the history on his own
Response FormatresponseFormattextarea""The openAi response_format definition as JSON text
On back in contextonReentryselect"reset"What should happen when the node re-enters the context?
On prompt changeonChangeselect"reset"What should happen if the user prompt changes?

Initial states

StateInitial ValueDescription
donefalseTrue if request has finished
thinkingfalseTrue if request is running
status0The response HTTP status code
answernullThe LLM answer string
errorfalseTrue if an error occurred
lastUserPrompt""Contains the last user prompt
historyContains the history if managed by the node
lastUsage{}Contains the token usage statistics for the last request
usingfalseIs the model using a tool right now?

Callable methods

  • reset() - Reset to initial state
  • send() - Send request
  • serverSideSend() - Send the request to the server side
  • used() - Called from a tool node after successful use of the tool.