LLMPlanner#

class langchain_experimental.plan_and_execute.planners.base.LLMPlanner[source]#

Bases: BasePlanner

LLM planner.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

param llm_chain: LLMChain [Required]#

The LLM chain to use.

param output_parser: PlanOutputParser [Required]#

The output parser to use.

param stop: List | None = None#

The stop list to use.

async aplan(inputs: dict, callbacks: list[BaseCallbackHandler] | BaseCallbackManager | None = None, **kwargs: Any) Plan[source]#

Given input, asynchronously decide what to do.

Parameters:
Return type:

Plan

plan(inputs: dict, callbacks: list[BaseCallbackHandler] | BaseCallbackManager | None = None, **kwargs: Any) Plan[source]#

Given input, decide what to do.

Parameters:
Return type:

Plan