Class: FunctionTool<T, R>
Simple Tool interface. Likely to change.
Type parameters
Name | Type |
---|---|
T | T |
R | extends string | Promise <string > |
Implements
BaseTool
<T
>
Constructors
constructor
• new FunctionTool<T
, R
>(_fn
, _metadata
): FunctionTool
<T
, R
>
Type parameters
Name | Type |
---|---|
T | T |
R | extends string | Promise <string > |
Parameters
Name | Type |
---|---|
_fn | (input : T ) => R |
_metadata | ToolMetadata <JSONSchemaType <T >> |
Returns
FunctionTool
<T
, R
>
Defined in
packages/core/src/tools/functionTool.ts:7
Properties
_fn
• Private
Readonly
_fn: (input
: T
) => R
Type declaration
▸ (input
): R
Parameters
Name | Type |
---|---|
input | T |