AxFlowTypedSubContext
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/flow/types.ts#L78
Type Parameters
| Type Parameter |
|---|
TNodes extends Record<string, AxProgrammable<any, any>> |
TState extends AxFlowState |
Methods
execute()
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/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/flow/types.ts#L82
Type Parameters
| Type Parameter |
|---|
TNodeName extends string |
TAI extends Readonly<AxAIService<unknown, unknown, string>> |
Parameters
| Parameter | Type |
|---|---|
nodeName | TNodeName |
mapping | (state: TState) => GetGenIn<TNodes[TNodeName]> |
dynamicContext? | AxFlowDynamicContext<TAI> |
Returns
AxFlowTypedSubContext<TNodes, AddNodeResult<TState, TNodeName, GetGenOut<TNodes[TNodeName]>>>
executeSteps()
executeSteps(initialState: TState, context: Readonly<{
mainAi: AxAIService;
mainOptions?: AxProgramForwardOptions<string>;
}>): Promise<AxFlowState>;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/flow/types.ts#L98
Parameters
| Parameter | Type |
|---|---|
initialState | TState |
context | Readonly<{ mainAi: AxAIService; mainOptions?: AxProgramForwardOptions<string>; }> |
Returns
Promise<AxFlowState>
map()
map<TNewState>(transform: (state: TState) => TNewState): AxFlowTypedSubContext<TNodes, TNewState>;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/flow/types.ts#L94
Type Parameters
| Type Parameter |
|---|
TNewState extends AxFlowState |
Parameters
| Parameter | Type |
|---|---|
transform | (state: TState) => TNewState |
Returns
AxFlowTypedSubContext<TNodes, TNewState>