Create Chat
AutomatR.ChatGPT.Activities.CreateChat
The "Create Chat" activity in AutomatR is designed for generating chat completions using the OpenAI GPT model. This activity sends a prompt content along with the selected model and other optional parameters to the OpenAI API, retrieves the generated response, and provides it as an output.
Properties
Name | Description |
---|---|
Input | |
Content | Enter the content for generating the prompt. This should be a topic or specific information you would like to generate text about. String variables containing the content. |
Model | Enter the model to be used for chat completion. String variables containing the model name. |
Role | Choose the role of the messages author. One of system, user, or assistant. Use the enumerator CreateChatRole to specify the role. |
Misc | |
Display Name | This property allows you to customize the display name of the activity within the workflow. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Create Chat" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
MaxTokens | Set the maximum token limit for chat completion. Controls the response length. Integer variables containing the maximum token value. |
Temperature | Specify the temperature for chat completion. Range: 0.0 to 2.0. Double variables containing the temperature value. |
Output | |
Response | Returns a detailed response generated by the model based on the provided content with a data type string. String variables to store the generated response. |
By configuring these properties, AutomatR users can leverage the "Prompt - Create Chat" activity to seamlessly integrate ChatGPT into their automation workflows, creating interactive and intelligent conversational experiences.
Important Notes
- Ensure that the "Create Chat" activity is used within the "ChatGPT Scope" activity to properly authenticate with the OpenAI API.
- Provide valid input values for model, role, temperature, and maximum tokens to achieve desired chat completion results.
How to use:
- Drag and drop the "Create Chat" activity onto the workflow.
- Configure the properties by specifying the content, model, role, temperature, and maximum tokens for chat completion.
- Optionally, configure the delay before executing the activity.
- Execute the workflow to generate a chat completion based on the provided input.
Example: Consider an example where the "Create Chat" activity is used to generate a response for a user query:
Create Chat:
Content: "Tell me a joke."
Model: "gpt-3.5-turbo"
Role: User
Temperature: 0.8
MaxTokens: 50
Response: jokeResponse
In this example, the activity generates a chat completion for the user's query, "Tell me a joke," using the GPT-3.5-turbo model with a user role, temperature of 0.8, and a maximum of 50 tokens. The resulting response is stored in the variable "jokeResponse" for further use in the workflow.