Skip to main content

Chat

Description

This Activity invokes the OpenAI Chat Service with the specified input message and returns the response received.

Properties

Input

  • Message – Specify the input message to generate the chat message.

  • Model – Select the Model from the dropdown list, which populates the available models based on the provided API key. See the model endpoint compatibility table for details on which models work with the Chat API. By default, it selects the Model specified inside OpenAI-Context Activity.

Optional

  • Add To History – This flag in OpenAI's Chat Service enables users to preserve interactions within the ongoing conversation history. This feature plays a vital role in sustaining context and continuity throughout the chat, thereby improving the relevance and accuracy of the AI's responses. By default, this is true.

  • Use History – This flag in OpenAI's Chat Service enables the AI to reference previous interactions in the conversation history for context. It ensures more coherent and contextually relevant responses based on past exchanges. By default, this is true.

  • Maximum Tokens – This feature within OpenAI's Chat Service defines the maximum length of AI-generated responses. This constraint regulates the level of detail in the AI's replies, promoting concise and targeted interactions. When left empty, the setting defaults to the maximum length specified by the Model, with a default maximum token count of 256.

 - Temperature – This setting in OpenAI's Chat Service governs the degree of creativity and diversity in the AI's responses. A higher temperature fosters extraordinary inventiveness and less predictability, whereas a lower temperature results in more consistent and anticipated outcomes. The temperature range is between 0 and 2. Values below 0 are treated as 0, while values exceeding two are regarded as 2. By default, the temperature is 0.7.

  • Top P—This property in OpenAI's Chat Service, also known as nucleus sampling, controls the randomness of responses by focusing on the most probable parts of the language model's predictions. Setting a high value for "Top P" increases diversity in responses, while a lower value results in more predictable and focused outputs. The Top P setting range in OpenAI's Chat Service typically spans from 0 to 1. By default, this value is set to 1.

  • Frequency Penalty—The "Frequency Penalty" parameter in OpenAI's Chat Service reduces the likelihood of repetitive or redundant language in the AI's responses. A higher value for this setting decreases the chance of repetition, encouraging more varied and unique output. The range is between 0 and 2. If the value is less than 0, it is considered 0; if it exceeds 2, it is regarded as 2. By default, it is set to 0.

  • Presence Penalty—The "Presence Penalty" parameter in OpenAI's Chat Service discourages the AI from repeating topics or phrases mentioned in the conversation. A higher value of this setting promotes a broader range of topics and ideas in the AI's responses, enhancing conversational diversity. The spectrum is between 0 and 2. If the value is less than 0, it is considered 0; if it exceeds 2, it is regarded as 2. By default, it is set to 0.

  • User - A unique identifier that can help OpenAI monitor and detect abuse, representing the end-user.

  • Continue On Error - This property specifies whether the automation should continue running even when the 'Chat' Activity throws an error. It only supports Boolean values (True, False), with the default value set to False.

note

It does not catch an error if this Activity is present inside the Try-Catch block and the value of this property is True.

Misc

  • DisplayName – Add a display name to your Activity.
  • Private – By default, Activity will log the values of your properties inside your workflow. If private is selected, then it stops logging.

Output

  • Chat Message – It returns the chat response generated by the Model
  • Raw Response – It returns the raw response from OpenAI.
  • Total Tokens - returns the total Tokens processed for this chat.

Examples

1. Download Enterprise Edition Example

Chat

2. Download Professional Edition Example

Chat