A class that extends AgentActionOutputParser to provide a custom implementation for parsing the output of a ZeroShotAgent action.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

finishToolName: string

Methods

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

    Returns string

    The format instructions for parsing the output.

  • Parses the text output of an agent action, extracting the tool, tool input, and output.

    Parameters

    • text: string

      The text output of an agent action.

    Returns Promise<{
        log: string;
        returnValues: {
            output: string;
        };
        tool?: undefined;
        toolInput?: undefined;
    } | {
        log: string;
        tool: string;
        toolInput: string;
        returnValues?: undefined;
    }>

    An object containing the tool, tool input, and output extracted from the text, along with the original text as a log.

Generated using TypeDoc