ToolResultClassification class
Verdict returned by a ToolResultClassifier for a tool result.
ToolResultClassification? classify({
required BaseTool tool,
required Map<String, dynamic> toolArgs,
required ToolContext toolContext,
required Object? result,
}) {
if (result is Map && result['status'] == 'ERROR') {
return ToolResultClassification(
status: 'ERROR',
errorMessage: 'Tool reported status=ERROR',
);
}
return null;
}
Constructors
- ToolResultClassification({required String status, String? errorMessage})
- Creates a tool result classification verdict.
Properties
- errorMessage → String?
-
Optional error message recorded when status is
'ERROR'.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → String
-
Classification status:
'OK'for a completed call or'ERROR'for a tool error.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited