ToolResultInputBlock class
Tool result block for user messages.
- Inheritance
-
- Object
- InputContentBlock
- ToolResultInputBlock
- Annotations
-
- @immutable
Constructors
-
ToolResultInputBlock({required String toolUseId, List<
ToolResultContent> ? content, bool? isError, CacheControlEphemeral? cacheControl}) -
Creates a ToolResultInputBlock.
const
-
ToolResultInputBlock.fromJson(Map<
String, dynamic> json) -
Creates a ToolResultInputBlock from JSON.
factory
- ToolResultInputBlock.text({required String toolUseId, required String text, bool? isError, CacheControlEphemeral? cacheControl})
-
Creates a ToolResultInputBlock with a single text result.
factory
Properties
- cacheControl → CacheControlEphemeral?
-
Cache control for this block.
final
-
content
→ List<
ToolResultContent> ? -
The result content (can be text, images, or mixed).
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isError → bool?
-
Whether this result represents an error.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toolUseId → String
-
The ID of the tool use this result is for.
final
Methods
-
copyWith(
{String? toolUseId, Object? content = unsetCopyWithValue, Object? isError = unsetCopyWithValue, Object? cacheControl = unsetCopyWithValue}) → ToolResultInputBlock - Creates a copy with replaced values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts to JSON.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override