AxSignatureBuilder
Defined in: https://github.com/ax-llm/ax/blob/be56d0cb4027af0a3a23d397cd01a57261e362d4/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/be56d0cb4027af0a3a23d397cd01a57261e362d4/src/ax/dsp/sig.ts#L131
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/be56d0cb4027af0a3a23d397cd01a57261e362d4/src/ax/dsp/sig.ts#L121
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<AddFieldToShape<_TInput, K, T>, _TOutput>;
Defined in: https://github.com/ax-llm/ax/blob/be56d0cb4027af0a3a23d397cd01a57261e362d4/src/ax/dsp/sig.ts#L49
Add an input field to the signature
Type Parameters
Type Parameter |
---|
K extends string |
T extends | AxFluentFieldInfo <any , any , any , any > | AxFluentFieldType <any , 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
<AddFieldToShape
<_TInput
, K
, T
>, _TOutput
>
output()
output<K, T>(
name: K,
fieldInfo: T,
prepend: boolean): AxSignatureBuilder<_TInput, AddFieldToShape<_TOutput, K, T>>;
Defined in: https://github.com/ax-llm/ax/blob/be56d0cb4027af0a3a23d397cd01a57261e362d4/src/ax/dsp/sig.ts#L86
Add an output field to the signature
Type Parameters
Type Parameter |
---|
K extends string |
T extends | AxFluentFieldInfo <any , any , any , any > | AxFluentFieldType <any , 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
, AddFieldToShape
<_TOutput
, K
, T
>>