FinishTool
A pass-through tool used with subgraphWithTask to signal task completion and return a structured result. Wraps outputs in FinishResult to support primitive outputTypes, which base Tool cannot handle directly.
Parameters
outputType
Type of the Output
customSerializer
Optional serializer override to use instead of the one that is passed to encode/decode tool methods. This is useful for certain internal implementations, such as some built-in subgraphs and subtasks, when the output is our own class and we don't want to rely on user-configured JSONSerializer.
Constructors
Link copied to clipboard
constructor(outputType: TypeToken)
A pass-through tool used with subgraphWithTask to signal task completion and return a structured result. Wraps outputs in FinishResult to support primitive outputTypes, which base Tool cannot handle directly.