Package com.axelor.ai.chat
Record Class UIMessage
java.lang.Object
java.lang.Record
com.axelor.ai.chat.UIMessage
- Record Components:
id- unique message IDrole- who sent the messageparts- the content parts that make up this messagemetadata- optional provider-specific metadata
public record UIMessage(String id, UIMessage.Role role, List<UIPart> parts, Object metadata)
extends Record
A message in the conversation history.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTrue when this message answers a tool approval: a part carrying an allow/deny decision.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanTrue for a USER row that is only a typed event marker (invite/remove — data parts, no conversation).metadata()Returns the value of themetadatarecord component.parts()Returns the value of thepartsrecord component.role()Returns the value of therolerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
isEventOnly
public boolean isEventOnly()True for a USER row that is only a typed event marker (invite/remove — data parts, no conversation). Event rows are audit/UI records: the provider skips them in replay, and the discussion-mode fold consumes them as delimited, non-instructional context. -
answersApproval
public boolean answersApproval()True when this message answers a tool approval: a part carrying an allow/deny decision. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
parts
Returns the value of thepartsrecord component.- Returns:
- the value of the
partsrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-