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
Nested Classes -
Field Summary
Fields inherited from interface ToolExecutionResult
FINISH_REASON, METADATA_TOOL_ID, METADATA_TOOL_NAME -
Constructor Summary
ConstructorsConstructorDescriptionDefaultToolExecutionResult(List<Message> conversationHistory, boolean returnDirect) Creates an instance of aDefaultToolExecutionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns the value of theconversationHistoryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thereturnDirectrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DefaultToolExecutionResult
Creates an instance of aDefaultToolExecutionResultrecord class.- Parameters:
conversationHistory- the value for theconversationHistoryrecord componentreturnDirect- the value for thereturnDirectrecord component
-
-
Method Details
-
builder
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
conversationHistory
Returns the value of theconversationHistoryrecord component.- Specified by:
conversationHistoryin interfaceToolExecutionResult- Returns:
- the value of the
conversationHistoryrecord component
-
returnDirect
public boolean returnDirect()Returns the value of thereturnDirectrecord component.- Specified by:
returnDirectin interfaceToolExecutionResult- Returns:
- the value of the
returnDirectrecord component
-