AxFluentFieldType
Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L300
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 |
TEvidence extends AxEvidenceOptions | undefined | AxEvidenceOptions | undefined |
Implements
Constructors
Constructor
new AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>(fieldType: object): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L335
Parameters
| Parameter | Type |
|---|---|
fieldType | { description?: string; evidence?: TEvidence; fields?: TFields; format?: string; isArray: TIsArray; isCached: TIsCached; isInternal: TIsInternal; isOptional: TIsOptional; itemDescription?: string; language?: string; maximum?: number; maxLength?: number; minimum?: number; minLength?: number; options?: TOptions; pattern?: string; patternDescription?: string; type: TType; valueDescriptions?: Readonly<Record<string, string>>; } |
fieldType.description? | string |
fieldType.evidence? | TEvidence |
fieldType.fields? | TFields |
fieldType.format? | string |
fieldType.isArray | TIsArray |
fieldType.isCached | TIsCached |
fieldType.isInternal | TIsInternal |
fieldType.isOptional | TIsOptional |
fieldType.itemDescription? | string |
fieldType.language? | 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 |
fieldType.valueDescriptions? | Readonly<Record<string, string>> |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>
Properties
Accessors
~standard
Get Signature
get ~standard(): Props<unknown, unknown>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L713
Standard Schema v1 surface — lets ax fields flow through any library that
accepts StandardSchemaV1 (tRPC, TanStack Form, Vercel AI SDK, etc.).
Returns
Props<unknown, unknown>
Methods
array()
array(desc?: string): AxFluentFieldType<TType, true, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L478
Parameters
| Parameter | Type |
|---|---|
desc? | string |
Returns
AxFluentFieldType<TType, true, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>
cache()
cache(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, true, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L519
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, TEvidence>
date()
date(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L668
Set date format validation for strings
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>
datetime()
datetime(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L690
Set datetime format validation for strings
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>
describeValues()
describeValues<D>(descriptions: D & Record<Exclude<keyof D, TType extends "boolean" ? "true" | "false" : TType extends "class" ? NonNullable<TOptions>[number] : never>, never>): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L380
Describe individual boolean outcomes or class labels without changing their value types.
Type Parameters
| Type Parameter |
|---|
D extends Readonly<Record<string, string>> |
Parameters
| Parameter | Type |
|---|---|
descriptions | D & Record<Exclude<keyof D, TType extends "boolean" ? "true" | "false" : TType extends "class" ? NonNullable<TOptions>[number] : never>, never> |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>
email()
email(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L596
Set email format validation for strings
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>
internal()
internal(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, true, TFields, TIsCached, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L498
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, true, TFields, TIsCached, TEvidence>
max()
max(value: number): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L567
Set maximum value for numbers or maximum length for strings
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>
min()
min(value: number): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L538
Set minimum value for numbers or minimum length for strings
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>
optional()
optional(): AxFluentFieldType<TType, TIsArray, TOptions, true, TIsInternal, TFields, TIsCached, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L462
Returns
AxFluentFieldType<TType, TIsArray, TOptions, true, TIsInternal, TFields, TIsCached, TEvidence>
regex()
regex(pattern: string, description: string): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L642
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, TEvidence>
url()
url(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L618
Set URL/URI format validation for strings
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence>
withEvidence()
withEvidence<E>(this: TType extends "boolean" | "class" | "score" ? AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence> : never, options?: E): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, E>;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/dsp/sig.ts#L407
Type Parameters
| Type Parameter | Default type |
|---|---|
E extends | AxEvidenceOptions | Omit<AxEvidenceOptions, "threshold"> & object | object |
Parameters
| Parameter | Type |
|---|---|
this | TType extends "boolean" | "class" | "score" ? AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, TEvidence> : never |
options? | E |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached, E>