AxProgrammable Generated TypeScript API reference. typescript api api/reference build/apidocs/Interface.AxProgrammable.md interface AxProgrammable

AxProgrammable

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L367

Extends

Extended by

Type Parameters

Type ParameterDefault type
IN-
OUT-
TModelKeystring

Methods

applyOptimization()

TypeScript
applyOptimization(optimizedProgram: AxOptimizedProgram<OUT>): void;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L329

Parameters

ParameterType
optimizedProgramAxOptimizedProgram<OUT>

Returns

void

Inherited from

AxTunable.applyOptimization


applyOptimizedComponents()

TypeScript
applyOptimizedComponents(updates: Readonly<Record<string, string>>): void;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L347

Apply a map of componentKey → newValue updates produced by an optimizer. Each program filters keys belonging to itself and dispatches internally. Unknown keys are silently ignored, which lets parents broadcast a single map across the whole subtree.

Parameters

ParameterType
updatesReadonly<Record<string, string>>

Returns

void

Inherited from

AxTunable.applyOptimizedComponents


forward()

TypeScript
forward(
   ai: Readonly<AxAIService>, 
   values: IN, 
options?: Readonly<AxProgramForwardOptions<TModelKey>>): Promise<OUT>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L307

Parameters

ParameterType
aiReadonly<AxAIService>
valuesIN
options?Readonly<AxProgramForwardOptions<TModelKey>>

Returns

Promise<OUT>

Inherited from

AxForwardable.forward


getChatLog()

TypeScript
getChatLog(): readonly AxChatLogEntry[];

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L363

Returns

readonly AxChatLogEntry[]

Inherited from

AxUsable.getChatLog


getId()

TypeScript
getId(): string;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L321

Returns

string

Inherited from

AxTunable.getId


getOptimizableComponents()

TypeScript
getOptimizableComponents(): readonly AxOptimizableComponent[];

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L339

Enumerate all string-valued artifacts this program tree exposes for reflective optimization (instructions, signature descriptions, function names/descriptions, agent system prompts, etc.). Composite programs flat-map their children’s components and append their own.

The optimizer never walks the tree — traversal is encapsulated here.

Returns

readonly AxOptimizableComponent[]

Inherited from

AxTunable.getOptimizableComponents


getSignature()

TypeScript
getSignature(): AxSignature;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L371

Returns

AxSignature


getTraces()

TypeScript
getTraces(): AxProgramTrace<IN, OUT>[];

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L323

Returns

AxProgramTrace<IN, OUT>[]

Inherited from

AxTunable.getTraces


getUsage()

TypeScript
getUsage(): 
  | AxModelUsage & object[]
  | AxAgentUsage;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L362

Returns

| AxModelUsage & object[] | AxAgentUsage

Inherited from

AxUsable.getUsage


namedProgramInstances()?

TypeScript
optional namedProgramInstances(): AxNamedProgramInstance<any, any>[];

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L324

Returns

AxNamedProgramInstance<any, any>[]

Inherited from

AxTunable.namedProgramInstances


resetUsage()

TypeScript
resetUsage(): void;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L364

Returns

void

Inherited from

AxUsable.resetUsage


setDemos()

TypeScript
setDemos(demos: readonly AxProgramDemos<IN, OUT, string>[], options?: object): void;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L325

Parameters

ParameterType
demosreadonly AxProgramDemos<IN, OUT, string>[]
options?{ modelConfig?: Record<string, unknown>; }
options.modelConfig?Record<string, unknown>

Returns

void

Inherited from

AxTunable.setDemos


setId()

TypeScript
setId(id: string): void;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L322

Parameters

ParameterType
idstring

Returns

void

Inherited from

AxTunable.setId


streamingForward()

TypeScript
streamingForward(
   ai: Readonly<AxAIService>, 
   values: IN, 
options?: Readonly<AxProgramStreamingForwardOptions<TModelKey>>): AxGenStreamingOut<OUT>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/types.ts#L313

Parameters

ParameterType
aiReadonly<AxAIService>
valuesIN
options?Readonly<AxProgramStreamingForwardOptions<TModelKey>>

Returns

AxGenStreamingOut<OUT>

Inherited from

AxForwardable.streamingForward

Docs