class WebFetch extends ProviderTool

Properties

protected array<string, mixed>|SerializableClosure $providerOptions from  ProviderTool

Methods

withProviderOptions(array|Closure $options)

Attach provider-specific options to the tool payload. Closures may only capture serializable values.

array
providerOptions(Lab|string $provider)

Get the provider-specific options for the given provider.

__construct(int|null $maxSearches = null, array $allowedDomains = [])

Create a web fetch tool with optional search limits and allowed domains.

max(int $max)

Set the maximum number of searches.

allow(array $domains)

Set the allowed domains.

Details

in ProviderTool at line 23
ProviderTool withProviderOptions(array|Closure $options)

Attach provider-specific options to the tool payload. Closures may only capture serializable values.

Parameters

array|Closure $options

Return Value

ProviderTool

in ProviderTool at line 37
array providerOptions(Lab|string $provider)

Get the provider-specific options for the given provider.

Parameters

Lab|string $provider

Return Value

array

at line 12
__construct(int|null $maxSearches = null, array $allowedDomains = [])

Create a web fetch tool with optional search limits and allowed domains.

Parameters

int|null $maxSearches
array $allowedDomains

at line 21
WebFetch max(int $max)

Set the maximum number of searches.

Parameters

int $max

Return Value

WebFetch

at line 31
WebFetch allow(array $domains)

Set the allowed domains.

Parameters

array $domains

Return Value

WebFetch