Package ai.mindconnect.agent.tool
Record Class ToolAdvisor.Result
java.lang.Object
java.lang.Record
ai.mindconnect.agent.tool.ToolAdvisor.Result
- Record Components:
text- text the LLM consumes as the tool resultfailed-truewhen the tool was unknown, threw, or was short-circuited as a failure
- Enclosing interface:
ToolAdvisor
What the LLM ends up seeing.
text is the tool result string
(or an error description on failure). failed drives the
runtime's failure-event vs success-event branch — advisors usually
don't flip this, but a sanitizer may downgrade a successful but
blocked call to failed=true with an explanatory text.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy withextraappended after a blank line.final booleanIndicates whether some other object is "equal to" this one.static ToolAdvisor.Resultbooleanfailed()Returns the value of thefailedrecord component.final inthashCode()Returns a hash code value for this object.static ToolAdvisor.Resulttext()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.Returns a copy with the result text replaced.
-
Constructor Details
-
Method Details
-
ok
-
error
-
withText
Returns a copy with the result text replaced. -
append
Returns a copy withextraappended after a blank line. Convenient for advisors that add a progress footer / status hint without disturbing the original output. -
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 '=='. -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
failed
public boolean failed()Returns the value of thefailedrecord component.- Returns:
- the value of the
failedrecord component
-