langchain_experimental.autonomous_agents.hugginggpt.task_planner.PlanningOutputParser¶

class langchain_experimental.autonomous_agents.hugginggpt.task_planner.PlanningOutputParser[source]¶

Bases: BaseModel

Parses the output of the planning stage.

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

Raises ValidationError if the input data cannot be parsed to form a valid model.

parse(text: str, hf_tools: List[BaseTool]) Plan[source]¶

Parse the output of the planning stage.

Parameters
  • text (str) – The output of the planning stage.

  • hf_tools (List[BaseTool]) – The tools available.

Returns

The plan.

Return type

Plan