class ToolSearch 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(array $tools = [], string|null $strategy = null)

Create a tool search with deferred tools and an optional search strategy.

withTools(array $tools)

Get a copy of the tool search with the given deferred tools.

static int
budget(array $tools)

Count the given tools for step budgeting, expanding each ToolSearch into its deferred tools.

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 17
__construct(array $tools = [], string|null $strategy = null)

Create a tool search with deferred tools and an optional search strategy.

Parameters

array $tools
string|null $strategy

at line 31
ToolSearch withTools(array $tools)

Get a copy of the tool search with the given deferred tools.

Parameters

array $tools

Return Value

ToolSearch

at line 45
static int budget(array $tools)

Count the given tools for step budgeting, expanding each ToolSearch into its deferred tools.

Parameters

array $tools

Return Value

int