Function: wrapToolExecute()

function wrapToolExecute<T>(fn): (input) => Promise<ToolExecutionResult>;

Defined in: tools/define.ts:119

Wrap an async function to catch errors and return ToolExecutionResult

Type Parameters

Type Parameter
T extends object

Parameters

Parameter Type
fn (input) => Promise<unknown>

Returns

(input) => Promise<ToolExecutionResult>