Record Class ContentBlocks.ToolResultBlock
java.lang.Object
java.lang.Record
ai.redouble.nucleo.harness.conversation.ContentBlocks.ToolResultBlock
- Record Components:
toolUseId- Reference to the ToolUseBlock that requested thisresultJson- Tool output as JSON stringisError- Whether this result represents an error
- All Implemented Interfaces:
ContentBlocks.ContentBlock
- Enclosing class:
ContentBlocks
public static record ContentBlocks.ToolResultBlock(String toolUseId, String resultJson, boolean isError)
extends Record
implements ContentBlocks.ContentBlock
Represents the result of a tool execution being sent back to the LLM.
Links to the original tool invocation via toolUseId.
- Since:
- 0.1 (2025-10-20)
- Author:
- Andrey Santrosyan
-
Constructor Summary
ConstructorsConstructorDescriptionToolResultBlock(String toolUseId, String resultJson, boolean isError) Creates an instance of aToolResultBlockrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisError()Returns the value of theisErrorrecord component.Returns the value of theresultJsonrecord component.Returns the value of thetoolUseIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ToolResultBlock
Creates an instance of aToolResultBlockrecord class.- Parameters:
toolUseId- the value for thetoolUseIdrecord componentresultJson- the value for theresultJsonrecord componentisError- the value for theisErrorrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
toolUseId
-
resultJson
Returns the value of theresultJsonrecord component.- Returns:
- the value of the
resultJsonrecord component
-
isError
-