langchain_core.output_parsers.base.BaseLLMOutputParser

class langchain_core.output_parsers.base.BaseLLMOutputParser[source]

Abstract base class for parsing the outputs of a model.

Methods

__init__()

aparse_result(result, *[, partial])

Parse a list of candidate model Generations into a specific format.

parse_result(result, *[, partial])

Parse a list of candidate model Generations into a specific format.

__init__()
async aparse_result(result: List[Generation], *, partial: bool = False) T[source]

Parse a list of candidate model Generations into a specific format.

Parameters
  • result (List[Generation]) – A list of Generations to be parsed. The Generations are assumed to be different candidate outputs for a single model input.

  • partial (bool) –

Returns

Structured output.

Return type

T

abstract parse_result(result: List[Generation], *, partial: bool = False) T[source]

Parse a list of candidate model Generations into a specific format.

Parameters
  • result (List[Generation]) – A list of Generations to be parsed. The Generations are assumed to be different candidate outputs for a single model input.

  • partial (bool) –

Returns

Structured output.

Return type

T