Record Class AssistantMessage
java.lang.Object
java.lang.Record
ai.agentscentral.core.session.message.AssistantMessage
- Record Components:
contextId-messageId-parts-toolCalls-handoffs-timestamp-
- All Implemented Interfaces:
Message
public record AssistantMessage(String contextId, String messageId, MessagePart[] parts, List<ToolCallInstruction> toolCalls, List<HandoffInstruction> handoffs, long timestamp)
extends Record
implements Message
AssistantMessage
- Author:
- Rizwan Idrees
-
Constructor Summary
ConstructorsConstructorDescriptionAssistantMessage(String contextId, String messageId, MessagePart[] parts, List<ToolCallInstruction> toolCalls, List<HandoffInstruction> handoffs, long timestamp) Creates an instance of aAssistantMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontextIdrecord component.final booleanIndicates whether some other object is "equal to" this one.handoffs()Returns the value of thehandoffsrecord component.booleanfinal inthashCode()Returns a hash code value for this object.booleanReturns the value of themessageIdrecord component.parts()Returns the value of thepartsrecord component.longReturns the value of thetimestamprecord component.Returns the value of thetoolCallsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AssistantMessage
public AssistantMessage(String contextId, String messageId, MessagePart[] parts, List<ToolCallInstruction> toolCalls, List<HandoffInstruction> handoffs, long timestamp) Creates an instance of aAssistantMessagerecord class.- Parameters:
contextId- the value for thecontextIdrecord componentmessageId- the value for themessageIdrecord componentparts- the value for thepartsrecord componenttoolCalls- the value for thetoolCallsrecord componenthandoffs- the value for thehandoffsrecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
hasToolCalls
public boolean hasToolCalls() -
hasHandOffs
public boolean hasHandOffs() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
contextId
Returns the value of thecontextIdrecord component. -
messageId
Returns the value of themessageIdrecord component. -
parts
Returns the value of thepartsrecord component. -
toolCalls
Returns the value of thetoolCallsrecord component.- Returns:
- the value of the
toolCallsrecord component
-
handoffs
Returns the value of thehandoffsrecord component.- Returns:
- the value of the
handoffsrecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.
-