ChatGPT is an advanced AI model developed by OpenAI. It's designed for conversational interactions and can understand and generate human-like text. With access to a wide range of knowledge sources, it can help with various tasks, provide information, and engage in meaningful conversations.
In this blog, we will guide you through an example of how to utilize the ChatGPT node in Robomotion.
How to Setup?
First, ensure that the OpenAI package is installed for this flow. Once the package is installed, you can proceed with the flow by utilizing its functionalities for your tasks.
About OpenAI Package
The OpenAI Package provides a simple interface to access the OpenAI API, which allows you to integrate cutting-edge natural language processing technology into your flows.
Exploring OpenAI Package: Navigating Package, Installing, and Understanding Flow Steps
- Click the cube icon to open the packages page.
- Right click to a package and then click the Install.
- ‘Inject’ node is used to initialize the flow.
Function Node Named “Config” Code-Block:
msg.askGPT = "How to identify SSL Certificate in a specific domain";
- The "OpenAI Connect" node facilitates the connection to your account using a provided api_key. To supply the API key, you need to generate a vault and create a vault item named API Key / Token. To generate a vault, please follow the instructions available at this link. Once the connection is established, the node provides a connection_id that can be used in other nodes within the OpenAI package.
- The OpenAI ChatGPT API is used to obtain a response from ChatGPT for a given prompt. To modify the properties, you can make changes in the "Options" tab. For instance, the "Temperature" property affects the quality of the response. It accepts values ranging from 0 to 1. A higher value, such as 0.9, tends to produce more creative answers. On the other hand, the "Max Tokens" property constrains the lenght of the response
OpenAI Disconnect node is used to disconnect a given account. It takes only one input: connection_id.
The "Debug" node, labeled as "Response," is utilized to display the values of variables. By providing a particular variable as input, it will only show the value of that specific variable. In this case, we have assigned the variable "msg.response" to showcase the value of the response.
- “Stop” node is used to stop the flow