Package com.tnsai.agents.async
Record Class ChatEvent.ToolCall
java.lang.Object
java.lang.Record
com.tnsai.agents.async.ChatEvent.ToolCall
- All Implemented Interfaces:
ChatEvent
- Enclosing interface:
ChatEvent
public static record ChatEvent.ToolCall(Instant timestamp, String toolName, Map<String,Object> arguments, String callId)
extends Record
implements ChatEvent
Tool call initiated event.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tnsai.agents.async.ChatEvent
ChatEvent.Completed, ChatEvent.Error, ChatEvent.Started, ChatEvent.Token, ChatEvent.ToolCall, ChatEvent.ToolResult -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentsrecord component.callId()Returns the value of thecallIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns true if this is a terminal event.Returns the value of thetimestamprecord component.toolName()Returns the value of thetoolNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ToolCall
-
ToolCall
Creates an instance of aToolCallrecord class.- Parameters:
timestamp- the value for thetimestamprecord componenttoolName- the value for thetoolNamerecord componentarguments- the value for theargumentsrecord componentcallId- the value for thecallIdrecord component
-
-
Method Details
-
isTerminal
public boolean isTerminal()Description copied from interface:ChatEventReturns true if this is a terminal event.- Specified by:
isTerminalin interfaceChatEvent
-
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). -
timestamp
Returns the value of thetimestamprecord component. -
toolName
Returns the value of thetoolNamerecord component.- Returns:
- the value of the
toolNamerecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-
callId
Returns the value of thecallIdrecord component.- Returns:
- the value of the
callIdrecord component
-