Skip to main content

Class: BaseOutputParser

schema.BaseOutputParser

Class to parse the output of an LLM call.

Hierarchy

Constructors

constructor

new BaseOutputParser()

Methods

_type

_type(): string

Return the string type key uniquely identifying this class of parser

Returns

string

Defined in

langchain/src/schema/index.ts:169


getFormatInstructions

Abstract getFormatInstructions(): string

Return a string describing the format of the output.

Example

{
"foo": "bar"
}

Returns

string

Format instructions.

Defined in

langchain/src/schema/index.ts:164


parse

Abstract parse(text): Promise<unknown>

Parse the output of an LLM call.

Parameters

NameTypeDescription
textstringLLM output to parse.

Returns

Promise<unknown>

Parsed output.

Defined in

langchain/src/schema/index.ts:145


parseWithPrompt

parseWithPrompt(text, _prompt): Promise<unknown>

Parameters

NameType
textstring
_promptBasePromptValue

Returns

Promise<unknown>

Defined in

langchain/src/schema/index.ts:147