AxSignatureBuilder
Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/dsp/sig.ts#L35
Type Parameters
Type Parameter | Default type |
---|---|
_TInput extends Record <string , any > | object |
_TOutput extends Record <string , any > | object |
Constructors
Constructor
new AxSignatureBuilder<_TInput, _TOutput>(): AxSignatureBuilder<_TInput, _TOutput>;
Returns
AxSignatureBuilder
<_TInput
, _TOutput
>
Methods
build()
build(): AxSignature<_TInput, _TOutput>;
Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/dsp/sig.ts#L127
Build the final AxSignature instance
Returns
AxSignature
<_TInput
, _TOutput
>
description()
description(description: string): AxSignatureBuilder<_TInput, _TOutput>;
Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/dsp/sig.ts#L117
Set the description for the signature
Parameters
Parameter | Type | Description |
---|---|---|
description | string | Description text |
Returns
AxSignatureBuilder
<_TInput
, _TOutput
>
input()
input<K, T>(
name: K,
fieldInfo: T,
prepend: boolean): AxSignatureBuilder<_TInput & Record<K, InferFluentType<T>>, _TOutput>;
Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/dsp/sig.ts#L49
Add an input field to the signature
Type Parameters
Type Parameter |
---|
K extends string |
T extends | AxFluentFieldType | AxFluentFieldInfo <any , any , any , any > |
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
name | K | undefined | Field name |
fieldInfo | T | undefined | Field type created with f.string(), f.number(), etc. |
prepend | boolean | false | If true, adds field to the beginning of input fields |
Returns
AxSignatureBuilder
<_TInput
& Record
<K
, InferFluentType
<T
>>, _TOutput
>
output()
output<K, T>(
name: K,
fieldInfo: T,
prepend: boolean): AxSignatureBuilder<_TInput, _TOutput & Record<K, InferFluentType<T>>>;
Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/dsp/sig.ts#L84
Add an output field to the signature
Type Parameters
Type Parameter |
---|
K extends string |
T extends | AxFluentFieldType | AxFluentFieldInfo <any , any , any , any > |
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
name | K | undefined | Field name |
fieldInfo | T | undefined | Field type created with f.string(), f.number(), etc. |
prepend | boolean | false | If true, adds field to the beginning of output fields |
Returns
AxSignatureBuilder
<_TInput
, _TOutput
& Record
<K
, InferFluentType
<T
>>>