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 org.springframework.ai.model.tool.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()Create a defaultToolExecutionResultbuilder.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
Description copied from interface:ToolExecutionResultCreate a defaultToolExecutionResultbuilder. -
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 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
-