AxFlowSubContextImpl
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/flow/subContext.ts#L27
Implementation of the sub-context for parallel execution
Implements
Constructors
Constructor
new AxFlowSubContextImpl(nodeGenerators: Map<string, AxForwardable<AxGenIn, AxGenOut, string> & AxTunable<AxGenIn, AxGenOut> & AxUsable>): AxFlowSubContextImpl;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/flow/subContext.ts#L30
Parameters
| Parameter | Type |
|---|---|
nodeGenerators | Map<string, AxForwardable<AxGenIn, AxGenOut, string> & AxTunable<AxGenIn, AxGenOut> & AxUsable> |
Returns
AxFlowSubContextImpl
Methods
execute()
execute<TAI>(
nodeName: string,
mapping: (state: AxFlowState) => Record<string, AxFieldValue>,
dynamicContext?: AxFlowDynamicContext<TAI>): this;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/flow/subContext.ts#L39
Type Parameters
| Type Parameter |
|---|
TAI extends Readonly<AxAIService<unknown, unknown, string>> |
Parameters
| Parameter | Type |
|---|---|
nodeName | string |
mapping | (state: AxFlowState) => Record<string, AxFieldValue> |
dynamicContext? | AxFlowDynamicContext<TAI> |
Returns
this
Implementation of
executeSteps()
executeSteps(initialState: AxFlowState, context: Readonly<{
mainAi: AxAIService;
mainOptions?: AxProgramForwardOptions<string>;
}>): Promise<AxFlowState>;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/flow/subContext.ts#L90
Parameters
| Parameter | Type |
|---|---|
initialState | AxFlowState |
context | Readonly<{ mainAi: AxAIService; mainOptions?: AxProgramForwardOptions<string>; }> |
Returns
Promise<AxFlowState>
Implementation of
map()
map(transform: (state: AxFlowState) => AxFlowState): this;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/flow/subContext.ts#L85
Parameters
| Parameter | Type |
|---|---|
transform | (state: AxFlowState) => AxFlowState |
Returns
this