Record Class DefaultToolExecutionResult
java.lang.Object
java.lang.Record
org.springframework.ai.model.tool.DefaultToolExecutionResult
- All Implemented Interfaces:
ToolExecutionResult
public record DefaultToolExecutionResult(List<Message> conversationHistory, boolean returnDirect)
extends Record
implements ToolExecutionResult
Default implementation of
ToolExecutionResult
.- Since:
- 1.0.0
- Author:
- Thomas Vitale
-
Nested Class Summary
-
Field Summary
Fields inherited from interface org.springframework.ai.model.tool.ToolExecutionResult
FINISH_REASON, METADATA_TOOL_ID, METADATA_TOOL_NAME
-
Constructor Summary
ConstructorDescriptionDefaultToolExecutionResult
(List<Message> conversationHistory, boolean returnDirect) Creates an instance of aDefaultToolExecutionResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a defaultToolExecutionResult
builder.Returns the value of theconversationHistory
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of thereturnDirect
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
DefaultToolExecutionResult
Creates an instance of aDefaultToolExecutionResult
record class.- Parameters:
conversationHistory
- the value for theconversationHistory
record componentreturnDirect
- the value for thereturnDirect
record component
-
-
Method Details
-
builder
Description copied from interface:ToolExecutionResult
Create a defaultToolExecutionResult
builder. -
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 '=='. -
conversationHistory
Returns the value of theconversationHistory
record component.- Specified by:
conversationHistory
in interfaceToolExecutionResult
- Returns:
- the value of the
conversationHistory
record component
-
returnDirect
public boolean returnDirect()Returns the value of thereturnDirect
record component.- Specified by:
returnDirect
in interfaceToolExecutionResult
- Returns:
- the value of the
returnDirect
record component
-