Package io.jmix.aichat.data
Enum Class MessageRole
- All Implemented Interfaces:
Serializable,Comparable<MessageRole>,Constable
The role of a message in an
AiMessageList: how the message list renders it.
Assistant messages are rendered as Markdown with embedded code blocks, user messages
as plain text, and the value is the client's routing discriminator.
Not the same type as AiMessageRole, which is the role on the
AiChatMessage data contract and an application entity's attribute type;
AiChat projects that role onto this one.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageRoleReturns the enum constant of this class with the specified name.static MessageRole[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
USER
A message authored by the end user. -
ASSISTANT
A message authored by the assistant (the model).
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-