Class ChatGPTMessage

java.lang.Object
com.intellijava.core.model.input.ChatMessage
com.intellijava.core.model.input.ChatGPTMessage

public class ChatGPTMessage extends ChatMessage
ChatGPTMessage represent a message element for the chat.
Author:
github.com/Barqawiz
  • Constructor Details

    • ChatGPTMessage

      public ChatGPTMessage()
      ChatGPTMessage default constructor.
    • ChatGPTMessage

      public ChatGPTMessage(String content, ChatGPTMessage.Role role)
      Initiate ChatGPTMessage with the mandatory parameters.
      Parameters:
      content - text input
      role - system or user or assistant to define who sent the message.
  • Method Details

    • getRole

      public ChatGPTMessage.Role getRole()
      get the input role. system : represents the instruction message. user : represents the end user message. assistant : represents the model message.
      Returns:
      system | user | assistant
    • setRole

      public void setRole(ChatGPTMessage.Role role)
      set the input role. system : represents the instruction message. user : represents the end user message. assistant : represents the model message.
      Parameters:
      role - system | user | assistant
    • setSystemRol

      public void setSystemRol()
      Sets the role for chatGPT instructions.
    • isSystemRol

      public boolean isSystemRol()
      Validate the current message role is system.
      Returns:
      true if system role.
    • setUserRol

      public void setUserRol()
      Sets the role for the user message.
    • setAssistantRol

      public void setAssistantRol()
      Sets the role for the model message.