WebFetchToolOptions
Namespace: Vercel.AI.WebFetch
public sealed class WebFetchToolOptionsOptions of the web fetch tool. Maps to the options of createWebFetchTool.
Inheritance: object
Properties
Section titled “Properties”AllowedDomains
Section titled “AllowedDomains”public IReadOnlyList<string>? AllowedDomains { get; set; }Only allow fetching from these domains and their subdomains. Cannot be combined with BlockedDomains.
Value: IReadOnlyList<string>
BlockedDomains
Section titled “BlockedDomains”public IReadOnlyList<string>? BlockedDomains { get; set; }Never fetch from these domains or their subdomains. Cannot be combined with AllowedDomains.
Value: IReadOnlyList<string>
DefuddleOptions
Section titled “DefuddleOptions”public WebFetchDefuddleOptions? DefuddleOptions { get; set; }Options for the HTML content extractor, e.g. ContentSelector to choose the main content element.
Value: WebFetchDefuddleOptions
public DownloadFetch? Fetch { get; set; }Custom fetch implementation. It must validate resolved addresses, like a DNS-pinned transport would.
Value: DownloadFetch
MaxBytes
Section titled “MaxBytes”public long MaxBytes { get; set; }Maximum response size in bytes. Defaults to 10 MiB.
Value: long
MaxLength
Section titled “MaxLength”public int MaxLength { get; set; }Maximum characters returned per call. Longer content can be read with the offset input. Defaults to 50,000.
Value: int
RequireUrlInUserMessage
Section titled “RequireUrlInUserMessage”public bool RequireUrlInUserMessage { get; set; }Only fetch URLs that appear in user messages. Prevents the model from fetching URLs it constructed itself,
e.g. to exfiltrate data. Defaults to false.
Value: bool
Timeout
Section titled “Timeout”public TimeSpan Timeout { get; set; }Timeout for fetching each URL, including redirects. Defaults to 30 seconds.
Value: TimeSpan
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product