Package dev.langchain4j.service.tool
Record Class ToolExecutionResult
java.lang.Object
java.lang.Record
dev.langchain4j.service.tool.ToolExecutionResult
public record ToolExecutionResult(ChatResponse chatResponse, List<ToolExecution> toolExecutions, TokenUsage tokenUsageAccumulator)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionToolExecutionResult
(ChatResponse chatResponse, List<ToolExecution> toolExecutions, TokenUsage tokenUsageAccumulator) Creates an instance of aToolExecutionResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechatResponse
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.Returns the value of thetokenUsageAccumulator
record component.Returns the value of thetoolExecutions
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ToolExecutionResult
public ToolExecutionResult(ChatResponse chatResponse, List<ToolExecution> toolExecutions, TokenUsage tokenUsageAccumulator) Creates an instance of aToolExecutionResult
record class.- Parameters:
chatResponse
- the value for thechatResponse
record componenttoolExecutions
- the value for thetoolExecutions
record componenttokenUsageAccumulator
- the value for thetokenUsageAccumulator
record component
-
-
Method Details
-
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)
. -
chatResponse
Returns the value of thechatResponse
record component.- Returns:
- the value of the
chatResponse
record component
-
toolExecutions
Returns the value of thetoolExecutions
record component.- Returns:
- the value of the
toolExecutions
record component
-
tokenUsageAccumulator
Returns the value of thetokenUsageAccumulator
record component.- Returns:
- the value of the
tokenUsageAccumulator
record component
-