Class DefaultStepwisePlanner
- java.lang.Object
-
- com.microsoft.semantickernel.planner.stepwiseplanner.DefaultStepwisePlanner
-
- All Implemented Interfaces:
StepwisePlanner
public class DefaultStepwisePlanner extends Object implements StepwisePlanner
A planner that creates a Stepwise plan using Mrkl systems.An implementation of a Mrkl system as described in https://arxiv.org/pdf/2205.00445.pdf
-
-
Constructor Summary
Constructors Constructor Description DefaultStepwisePlanner(Kernel kernel, StepwisePlannerConfig config, String prompt, PromptTemplateConfig promptUserConfig)Initialize a new instance of theStepwisePlannerclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlancreatePlan(String goal)Create a plan for the specified goal.reactor.core.publisher.Mono<SKContext>executePlanAsync(String question, String functionDescriptions, SKContext context)Execute a plan.
-
-
-
Constructor Detail
-
DefaultStepwisePlanner
public DefaultStepwisePlanner(Kernel kernel, @Nullable StepwisePlannerConfig config, @Nullable String prompt, @Nullable PromptTemplateConfig promptUserConfig)
Initialize a new instance of theStepwisePlannerclass.- Parameters:
kernel- The semantic kernel instance.config- Optional configuration objectprompt- Optional prompt overridepromptUserConfig- Optional prompt config override
-
-
Method Detail
-
createPlan
public Plan createPlan(String goal)
Create a plan for the specified goal.- Specified by:
createPlanin interfaceStepwisePlanner- Parameters:
goal- The goal to create a plan for.- Returns:
- The plan.
-
executePlanAsync
public reactor.core.publisher.Mono<SKContext> executePlanAsync(String question, String functionDescriptions, SKContext context)
Execute a plan.- Parameters:
question- The question to answerfunctionDescriptions- List of tool descriptionscontext- The context- Returns:
- Result of the plan
-
-