Package com.aispect.core.client.model
Record Class Message
java.lang.Object
java.lang.Record
com.aispect.core.client.model.Message
- Record Components:
role- The role from which the message originated (e.g. user, assistant, system or tool)content- specific text contenttoolCalls- Tool call listtoolCallId- Tool callID
public record Message(Role role, String content, List<ToolCall> toolCalls, String toolCallId, byte[] inlineData, String mimeType)
extends Record
Abstract conversation message entity.
used on the client side and AI Pass structured dialogue text segments between models. Each message has its own speaking role.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.byte[]Returns the value of theinlineDatarecord component.mimeType()Returns the value of themimeTyperecord component.role()Returns the value of therolerecord component.Returns the value of thetoolCallIdrecord component.Returns the value of thetoolCallsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Message
-
Message
-
Message
public Message(Role role, String content, List<ToolCall> toolCalls, String toolCallId, byte[] inlineData, String mimeType) Creates an instance of aMessagerecord class.- Parameters:
role- the value for therolerecord componentcontent- the value for thecontentrecord componenttoolCalls- the value for thetoolCallsrecord componenttoolCallId- the value for thetoolCallIdrecord componentinlineData- the value for theinlineDatarecord componentmimeType- the value for themimeTyperecord component
-
-
Method Details
-
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). -
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
toolCalls
Returns the value of thetoolCallsrecord component.- Returns:
- the value of the
toolCallsrecord component
-
toolCallId
Returns the value of thetoolCallIdrecord component.- Returns:
- the value of the
toolCallIdrecord component
-
inlineData
public byte[] inlineData()Returns the value of theinlineDatarecord component.- Returns:
- the value of the
inlineDatarecord component
-
mimeType
Returns the value of themimeTyperecord component.- Returns:
- the value of the
mimeTyperecord component
-