Using ChatGPT node in your agent
The ChatGPT Node allows you to bring powerful AI capabilities into your agent. With just a few steps, you enable your agent to process natural language inputs and respond intelligently.
Prerequisites
Before you begin, ensure you have:
- An API Key from the OpenAI platform. - You can follow OpenAI's official guide to get your API key 
 
Step-by-Step Guide
The final agent is setup as below:

Add the ChatGPT Node
- From the Node Library on the left panel, expand the Llm section. 
- Drag the ChatOpenAI node onto your workspace. 
Configure the ChatGPT Node
- API Key: - Paste your OpenAI API key into the - apiKeyfield of the node.
- This key authenticates your requests to OpenAI’s servers. 
 
- Model Name: - The default model is - gpt-4(or- gpt-3.5-turboif you prefer).
- Specify the model in the - modelNamefield.
 
- Temperature (Optional): - This controls the randomness of the AI’s responses. 
- A value of - 0gives deterministic responses, while higher values introduce more variability.
 
- Schema: - For our example, the schema can be ignored since we’re working with a simple string input. 
 
- Error Handling: - We’re skipping error handling for now, but this can be added later to manage API errors. 
 
Connect the Nodes
- Execution Flow (Exec): - Connect the - execport of the Input Node to the- execport of the ChatOpenAI node.
- Then, connect the - execport of the ChatOpenAI node to the- execport of the Output Node.
 
- Message Flow: - Connect the - messageport of the Input Node to the- messageport of the ChatOpenAI node.
- Finally, connect the - responseport of the ChatOpenAI node to the- messageport of the Output Node.
 
Test Your Agent
- Use the Message Box at the bottom-right to send a message (e.g., “Hi”). 
- Observe the response: - Your input message is processed by the ChatGPT Node and returned through the Output Node. 
- For example, if you type “Hi,” you might receive “Hello! How can I assist you today?” 
 
What’s Next?
By integrating the ChatGPT Node, your agent can now handle conversational input and provide intelligent, context-aware responses. Let’s move forward to building more advanced workflows!
Last updated