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 to be used. The list will be populated based on the models available for the specified 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 allows users to include interactions in the ongoing conversation history. This feature is crucial for maintaining context and continuity in the chat, enhancing 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. This ensures more coherent and contextually relevant responses based on past exchanges. By default, this is true.

  • Maximum Tokens – This setting in OpenAI's Chat Service specifies the maximum length of the AI-generated response. This limit controls the verbosity and detail of the AI's replies, ensuring concise and focused interactions. In the empty setting, it will utilize the maximum length of the specified Model. By default, it is set to 256.

  • Temperature – This setting in OpenAI's Chat Service controls the level of creativity and variability in the AI's responses. A higher temperature produces more inventive and less predictable replies, while a lower temperature yields more consistent and expected outcomes. The range for the "Temperature" 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.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, it 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 to 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 already 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 to 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 – Specifies if the automation should continue even when the Activity throws an error. This field only supports Boolean values (True, False). The default value is False.

    note

    Catches no 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