WebFetchTool class
Web fetch built-in tool.
- Inheritance
-
- Object
- BuiltInTool
- WebFetchTool
- Annotations
-
- @immutable
Constructors
-
WebFetchTool({String? type, List<
String> ? allowedDomains, List<String> ? blockedDomains, CacheControlEphemeral? cacheControl, int? maxUses, int? maxContentTokens, RequestCitationsConfig? citations, List<String> ? allowedCallers, bool? deferLoading, bool? strict, bool? useCache}) -
Creates a WebFetchTool.
const
-
WebFetchTool.fromJson(Map<
String, dynamic> json) -
Creates a WebFetchTool from JSON.
factory
Properties
-
allowedCallers
→ List<
String> ? -
Allowed caller types.
final
-
allowedDomains
→ List<
String> ? -
Allowed domains for fetch requests.
final
-
blockedDomains
→ List<
String> ? -
Blocked domains for fetch requests.
final
- cacheControl → CacheControlEphemeral?
-
Cache control for this tool definition.
final
- citations → RequestCitationsConfig?
-
Citations configuration.
final
- deferLoading → bool?
-
Whether to defer loading until requested via tool reference.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- maxContentTokens → int?
-
Maximum number of content tokens to include from fetched page.
final
- maxUses → int?
-
Maximum number of tool invocations.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- strict → bool?
-
Whether strict schema validation is enabled.
final
- type → String
-
Tool type version.
final
- useCache → bool?
-
Whether to use cached content.
final
Methods
-
copyWith(
{String? type, Object? allowedDomains = unsetCopyWithValue, Object? blockedDomains = unsetCopyWithValue, Object? cacheControl = unsetCopyWithValue, Object? maxUses = unsetCopyWithValue, Object? maxContentTokens = unsetCopyWithValue, Object? citations = unsetCopyWithValue, Object? allowedCallers = unsetCopyWithValue, Object? deferLoading = unsetCopyWithValue, Object? strict = unsetCopyWithValue, Object? useCache = unsetCopyWithValue}) → WebFetchTool - 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