Skip to content

WebFetchToolOptions

Namespace: Vercel.AI.WebFetch

public sealed class WebFetchToolOptions

Options of the web fetch tool. Maps to the options of createWebFetchTool.

Inheritance: object

View source

public IReadOnlyList<string>? AllowedDomains { get; set; }

Only allow fetching from these domains and their subdomains. Cannot be combined with BlockedDomains.

Value: IReadOnlyList<string>

View source

public IReadOnlyList<string>? BlockedDomains { get; set; }

Never fetch from these domains or their subdomains. Cannot be combined with AllowedDomains.

Value: IReadOnlyList<string>

View source

public WebFetchDefuddleOptions? DefuddleOptions { get; set; }

Options for the HTML content extractor, e.g. ContentSelector to choose the main content element.

Value: WebFetchDefuddleOptions

View source

public DownloadFetch? Fetch { get; set; }

Custom fetch implementation. It must validate resolved addresses, like a DNS-pinned transport would.

Value: DownloadFetch

View source

public long MaxBytes { get; set; }

Maximum response size in bytes. Defaults to 10 MiB.

Value: long

View source

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

View source

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

View source

public TimeSpan Timeout { get; set; }

Timeout for fetching each URL, including redirects. Defaults to 30 seconds.

Value: TimeSpan

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product