OpenAI ChatGPT - Generate text
Use the OpenAI ChatGPT - Generate text action A tool for building the processes, logic, and direction within workflows. Actions are the steps the workflow performs to complete a process. to generate AI-powered text using your own API key. This action allows you to submit free-text input and receive optimized, secure output directly within your workflow.
To customize the action, you can select the model version, adjust parameters, and set the output behavior. By using your own API key, you have full control over usage and security.
Note: It is recommended to check the service provider’s own API documentation for the most up-to-date model names and parameter limits, as these can change frequently. For more information, see OpenAI ChatGPT documentation.
Configure OpenAI ChatGPT - Generate text action
-
Add the action to the workflow and open the action configuration panel. For more information, see Add an action to the workflow.
- Select a Connection. If you do not have a connection, see Add a connection. For information on creating an OpenAI ChatGPT connector, see OpenAI ChatGPT.
- Select the Model you want to use to generate the text or insert a variable.
- To add a message item, click Add message item.
- Select a role or insert a variable in the Role field.
- Type the text you want to generate or insert a variable that contains the text in the Content field.
- Type the temperature value or insert a variable in the Temperature field (optional).
- Type the top p value or insert a variable in the Top p field (optional).
- Type the number of tokens or insert a variable in the Max tokens field (optional).
-
To store the output, select or add a variable in the Generated text field.
, then click Delete.OpenAI ChatGPT - Generate text action fields and settings
| Section | Field | Description |
Variable |
|---|---|---|---|
| (unlabeled) | Connection |
The connection that is used to enable the action. To refresh the available connections, click |
(n/a) |
| Model | The model that is used to generate the text.
Note: It is recommended to select the model you want to use from the list of available models in the drop-down. |
Text, Decimal, Integer, Boolean, DateTime, Collection | |
| Messages | Add message item | Adds a message item. You can add multiple messages. |
(n/a) |
| Role | Displays all available roles and determines the purpose of the message. Selecting the relevant role helps the model understand the content and generate accurate responses. | Text, Decimal, Integer, Boolean, DateTime, Collection | |
| Content | Accepts multi-line text input. This is the main body of the AI prompt that the AI uses to generate a response. Add your content here to guide the AI in generating the output you want. Clear and detailed content helps the AI understand your intent and deliver a more accurate response. | Text, Decimal, Integer, Boolean, DateTime, Collection | |
| (unlabeled) | Temperature |
Determines the creativity of the model’s responses. Type a value between 0 and 2. Lower values generate more focused and predictable output, and higher values generate more creative and varied output.
Note: If you leave the field empty, the action assigns the default value defined by the AI service provider. |
Decimal, Integer |
| Top p |
Determines the nucleus sampling that controls how broadly the model selects possible next words. Type a value between 0 and 1. Lower values limit responses to common words and higher values allow greater variety.
Note: If you leave the field empty, the action assigns the default value defined by the AI service provider. |
Decimal, Integer | |
| Max tokens |
Determines the maximum number of tokens the model can generate in a single response. Note: If not set, the model defaults to its maximum capacity and generates output up to that limit. |
Integer | |
| Output | Generated text | Stores the text generated by the model. | Objects Models access objects (data containers with records and fields) to provide data to app page components. "Object" is a generic term used in Nintex Apps. In other products they may be "objects," "entities," or "tables." |