AxFluentFieldType
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L209
Type Parameters
| Type Parameter | Default type |
|---|---|
TType extends AxFieldType["type"] | AxFieldType["type"] |
TIsArray extends boolean | false |
TOptions extends readonly string[] | undefined | undefined |
TIsOptional extends boolean | false |
TIsInternal extends boolean | false |
TFields extends | Record<string, | AxFluentFieldInfo | AxFluentFieldType> | undefined | undefined |
TIsCached extends boolean | false |
Implements
Constructors
Constructor
new AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>(fieldType: object): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L238
Parameters
| Parameter | Type |
|---|---|
fieldType | { description?: string; fields?: TFields; format?: string; isArray: TIsArray; isCached: TIsCached; isInternal: TIsInternal; isOptional: TIsOptional; itemDescription?: string; maximum?: number; maxLength?: number; minimum?: number; minLength?: number; options?: TOptions; pattern?: string; patternDescription?: string; type: TType; } |
fieldType.description? | string |
fieldType.fields? | TFields |
fieldType.format? | string |
fieldType.isArray | TIsArray |
fieldType.isCached | TIsCached |
fieldType.isInternal | TIsInternal |
fieldType.isOptional | TIsOptional |
fieldType.itemDescription? | string |
fieldType.maximum? | number |
fieldType.maxLength? | number |
fieldType.minimum? | number |
fieldType.minLength? | number |
fieldType.options? | TOptions |
fieldType.pattern? | string |
fieldType.patternDescription? | string |
fieldType.type | TType |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>
Properties
Methods
array()
array(desc?: string): AxFluentFieldType<TType, true, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L289
Parameters
| Parameter | Type |
|---|---|
desc? | string |
Returns
AxFluentFieldType<TType, true, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>
cache()
cache(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, true>;
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L328
Mark this input field for caching. When contextCache is enabled, cached fields are rendered in a separate user message with cache: true, allowing them to be cached by the LLM provider.
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, true>
date()
date(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L471
Set date format validation for strings
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>
datetime()
datetime(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L492
Set datetime format validation for strings
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>
email()
email(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L402
Set email format validation for strings
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>
internal()
internal(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, true, TFields, TIsCached>;
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L308
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, true, TFields, TIsCached>
max()
max(value: number): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L374
Set maximum value for numbers or maximum length for strings
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>
min()
min(value: number): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L346
Set minimum value for numbers or minimum length for strings
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>
optional()
optional(): AxFluentFieldType<TType, TIsArray, TOptions, true, TIsInternal, TFields, TIsCached>;
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L274
Returns
AxFluentFieldType<TType, TIsArray, TOptions, true, TIsInternal, TFields, TIsCached>
regex()
regex(pattern: string, description: string): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L446
Set regex pattern validation for strings
Parameters
| Parameter | Type | Description |
|---|---|---|
pattern | string | Regular expression pattern to match |
description | string | Human-readable description of what the pattern validates (e.g., “Must be a valid username with only lowercase letters, numbers, and underscores”) |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>
url()
url(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;
Defined in: https://github.com/ax-llm/ax/blob/242cf18d21de9f9d58c7c82f53305f0605497473/src/ax/dsp/sig.ts#L423
Set URL/URI format validation for strings
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>