Enum Class Role

java.lang.Object
java.lang.Enum<Role>
uno.anahata.asi.agi.message.Role
All Implemented Interfaces:
Serializable, Comparable<Role>, Constable

public enum Role extends Enum<Role>
Defines the role of the entity that created a message, providing a type-safe way to distinguish between user, model, and tool messages.
Author:
anahata-gemini-pro-2.5
  • Enum Constant Details

    • SYSTEM

      public static final Role SYSTEM
      A message providing high-level instructions to the model.
    • USER

      public static final Role USER
      A message sent by the end-user.
    • MODEL

      public static final Role MODEL
      A message generated by the AI model.
    • TOOL

      public static final Role TOOL
      A message containing the results of a tool execution.
  • Constructor Details

    • Role

      private Role()
  • Method Details

    • values

      public static Role[] 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 Role 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