Record Class ResultWithAgenticScope<T>
java.lang.Object
java.lang.Record
dev.langchain4j.agentic.scope.ResultWithAgenticScope<T>
- Type Parameters:
T- The type of the result.
Holds the result of an agent invocation along with its associated
AgenticScope.
This is useful for returning results from agents while also providing access to the cognitive
scope through which that result has been generated.-
Constructor Summary
ConstructorsConstructorDescriptionResultWithAgenticScope(AgenticScope agenticScope, T result) Creates an instance of aResultWithAgenticScoperecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theagenticScoperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.result()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResultWithAgenticScope
Creates an instance of aResultWithAgenticScoperecord class.- Parameters:
agenticScope- the value for theagenticScoperecord componentresult- the value for theresultrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
agenticScope
Returns the value of theagenticScoperecord component.- Returns:
- the value of the
agenticScoperecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-