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

AxFlowTypedSubContext

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

Type Parameters

Type Parameter
TNodes extends Record<string, AxProgrammable<any, any>>
TState extends AxFlowState

Methods

execute()

TypeScript
execute<TNodeName, TAI>(
   nodeName: TNodeName, 
   mapping: (state: TState) => GetGenIn<TNodes[TNodeName]>, 
dynamicContext?: AxFlowDynamicContext<TAI>): AxFlowTypedSubContext<TNodes, AddNodeResult<TState, TNodeName, GetGenOut<TNodes[TNodeName]>>>;

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

Type Parameters

Type Parameter
TNodeName extends string
TAI extends Readonly<AxAIService<unknown, unknown, string>>

Parameters

ParameterType
nodeNameTNodeName
mapping(state: TState) => GetGenIn<TNodes[TNodeName]>
dynamicContext?AxFlowDynamicContext<TAI>

Returns

AxFlowTypedSubContext<TNodes, AddNodeResult<TState, TNodeName, GetGenOut<TNodes[TNodeName]>>>


executeSteps()

TypeScript
executeSteps(initialState: TState, context: Readonly<{
  executeSteps?: (steps: readonly unknown[], initialState: AxFlowState) => Promise<AxFlowState>;
  mainAi: AxAIService;
  mainOptions?: AxProgramForwardOptions<string>;
}>): Promise<AxFlowState>;

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

Parameters

ParameterType
initialStateTState
contextReadonly<{ executeSteps?: (steps: readonly unknown[], initialState: AxFlowState) => Promise<AxFlowState>; mainAi: AxAIService; mainOptions?: AxProgramForwardOptions<string>; }>

Returns

Promise<AxFlowState>


map()

TypeScript
map<TNewState>(transform: (state: TState) => TNewState): AxFlowTypedSubContext<TNodes, TNewState>;

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

Type Parameters

Type Parameter
TNewState extends AxFlowState

Parameters

ParameterType
transform(state: TState) => TNewState

Returns

AxFlowTypedSubContext<TNodes, TNewState>

Docs