Class StructuredChatOutputParser

A class that provides a custom implementation for parsing the output of a StructuredChatAgent action. It extends the AgentActionOutputParser class and extracts the action and action input from the text output, returning an AgentAction or AgentFinish object.

Hierarchy

Constructors

Methods

Constructors

Methods

  • Returns the format instructions for parsing the output of an agent action in the style of the StructuredChatAgent.

    Returns string

    A string representing the format instructions.

  • Parses the given text and returns an AgentAction or AgentFinish object. If an OutputFixingParser is provided, it is used for parsing; otherwise, the base parser is used.

    Parameters

    • text: string

      The text to parse.

    Returns Promise<AgentAction | AgentFinish>

    A Promise that resolves to an AgentAction or AgentFinish object.

Generated using TypeDoc