Enum Class ChatMessageRole

java.lang.Object
java.lang.Enum<ChatMessageRole>
xyz.felh.openai.chat.ChatMessageRole
All Implemented Interfaces:
Serializable, Comparable<ChatMessageRole>, Constable

public enum ChatMessageRole extends Enum<ChatMessageRole>
  • Enum Constant Details

    • SYSTEM

      public static final ChatMessageRole SYSTEM
      content - Required The contents of the user message. role - Required The role of the messages author, in this case user.
    • USER

      public static final ChatMessageRole USER
      content - Required The contents of the user message. role - Required The role of the messages author, in this case user.
    • ASSISTANT

      public static final ChatMessageRole ASSISTANT
      content - Required The contents of the assistant message. role - Required The role of the messages author, in this case assistant. tool_calls - Optional The tool calls generated by the model, such as function calls.
    • TOOL

      public static final ChatMessageRole TOOL
      role - Required The role of the messages author, in this case tool. content - Required The contents of the tool message. tool_call_id - Required Tool call that this message is responding to.
  • Method Details

    • values

      public static ChatMessageRole[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ChatMessageRole valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • value

      public String value()