Class: FunctionTool<T, R>
Simple Tool interface. Likely to change.
Type parameters
• T
• R extends JSONValue
| Promise
<JSONValue
>
Implements
BaseTool
<T
>
Constructors
new FunctionTool()
new FunctionTool<
T
,R
>(_fn
,_metadata
):FunctionTool
<T
,R
>
Parameters
• _fn
• _metadata: ToolMetadata
<JSONSchemaType
<T
>>
Returns
FunctionTool
<T
, R
>
Source
packages/core/src/tools/functionTool.ts:7
Properties
_fn()
private
readonly
_fn: (input
) =>R
Parameters
• input: T
Returns
R
Source
packages/core/src/tools/functionTool.ts:8
_metadata
private
readonly
_metadata:ToolMetadata
<JSONSchemaType
<T
>>
Source
packages/core/src/tools/functionTool.ts:9