AxEventTargetBuilder Generated TypeScript API reference. typescript api api/reference build/apidocs/Class.AxEventTargetBuilder.md class AxEventTargetBuilder

AxEventTargetBuilder

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L429

Type Parameters

Type ParameterDefault type
INRecord<string, unknown>
OUTunknown

Constructors

Constructor

TypeScript
new AxEventTargetBuilder<IN, OUT>(id: string): AxEventTargetBuilder<IN, OUT>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L432

Parameters

ParameterType
idstring

Returns

AxEventTargetBuilder<IN, OUT>

Methods

ai()

TypeScript
ai(ai: Readonly<AxAIService>): this;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L456

Parameters

ParameterType
aiReadonly<AxAIService>

Returns

this


build()

TypeScript
build(): AxEventTarget<IN, OUT>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L514

Returns

AxEventTarget<IN, OUT>


createProgram()

TypeScript
createProgram<NextInput, NextOutput>(signature: Readonly<AxSignature>, factory: (instance: TargetFactoryInstance) => 
  | AxProgrammable<NextInput, NextOutput, string>
| Promise<AxProgrammable<NextInput, NextOutput, string>>): AxEventTargetBuilder<NextInput, NextOutput>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L443

Type Parameters

Type Parameter
NextInput
NextOutput

Parameters

ParameterType
signatureReadonly<AxSignature>
factory(instance: TargetFactoryInstance) => | AxProgrammable<NextInput, NextOutput, string> | Promise<AxProgrammable<NextInput, NextOutput, string>>

Returns

AxEventTargetBuilder<NextInput, NextOutput>


execution()

TypeScript
execution(execution: "streaming" | "forward"): this;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L494

Parameters

ParameterType
execution"streaming" | "forward"

Returns

this


forwardOptions()

TypeScript
forwardOptions(options: Readonly<AxProgramForwardOptions<string>>): this;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L489

Parameters

ParameterType
optionsReadonly<AxProgramForwardOptions<string>>

Returns

this


input()

TypeScript
input(definition: AxEventInputDefinition<IN>): this;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L461

Parameters

ParameterType
definitionAxEventInputDefinition<IN>

Returns

this


program()

TypeScript
program<NextInput, NextOutput>(program: AxProgrammable<NextInput, NextOutput>): AxEventTargetBuilder<NextInput, NextOutput>;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L436

Type Parameters

Type Parameter
NextInput
NextOutput

Parameters

ParameterType
programAxProgrammable<NextInput, NextOutput>

Returns

AxEventTargetBuilder<NextInput, NextOutput>


resumeInput()

TypeScript
resumeInput(definition: AxEventInputDefinition<IN>): this;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L471

Parameters

ParameterType
definitionAxEventInputDefinition<IN>

Returns

this


retrySafety()

TypeScript
retrySafety(retrySafety: "unknown" | "idempotent"): this;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L509

Parameters

ParameterType
retrySafety"unknown" | "idempotent"

Returns

this


sink()

TypeScript
sink(sink: AxEventSink<OUT>): this;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L504

Parameters

ParameterType
sinkAxEventSink<OUT>

Returns

this


state()

TypeScript
state(state: AxEventProgramStateAdapter<AxProgrammable<IN, OUT, string>>): this;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L499

Parameters

ParameterType
stateAxEventProgramStateAdapter<AxProgrammable<IN, OUT, string>>

Returns

this


waitFor()

TypeScript
waitFor(
   kind: string, 
   value: Readonly<AxEventPath>, 
   options: Readonly<{
  expiresInMs?: number;
  metadata?: Readonly<Record<string, Readonly<AxEventPath>>>;
}>): this;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L476

Parameters

ParameterType
kindstring
valueReadonly<AxEventPath>
optionsReadonly<{ expiresInMs?: number; metadata?: Readonly<Record<string, Readonly<AxEventPath>>>; }>

Returns

this


wakeInput()

TypeScript
wakeInput(definition: AxEventInputDefinition<IN>): this;

Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/event/mapping.ts#L466

Parameters

ParameterType
definitionAxEventInputDefinition<IN>

Returns

this

Docs