output_parsers#

OutputParser classes parse the output of an LLM call.

Class hierarchy:

BaseLLMOutputParser --> BaseOutputParser --> <name>OutputParser  # ListOutputParser, PydanticOutputParser

Main helpers:

Serializable, Generation, PromptValue

Classes

output_parsers.boolean.BooleanOutputParser

Parse the output of an LLM call to a boolean.

output_parsers.combining.CombiningOutputParser

Combine multiple output parsers into one.

output_parsers.datetime.DatetimeOutputParser

Parse the output of an LLM call to a datetime.

output_parsers.enum.EnumOutputParser

Parse an output that is one of a set of values.

output_parsers.fix.OutputFixingParser

Wrap a parser and try to fix parsing errors.

output_parsers.fix.OutputFixingParserRetryChainInput

output_parsers.pandas_dataframe.PandasDataFrameOutputParser

Parse an output using Pandas DataFrame format.

output_parsers.regex.RegexParser

Parse the output of an LLM call using a regex.

output_parsers.regex_dict.RegexDictParser

Parse the output of an LLM call into a Dictionary using a regex.

output_parsers.retry.RetryOutputParser

Wrap a parser and try to fix parsing errors.

output_parsers.retry.RetryOutputParserRetryChainInput

output_parsers.retry.RetryWithErrorOutputParser

Wrap a parser and try to fix parsing errors.

output_parsers.retry.RetryWithErrorOutputParserRetryChainInput

output_parsers.structured.ResponseSchema

Schema for a response from a structured output parser.

output_parsers.structured.StructuredOutputParser

Parse the output of an LLM call to a structured output.

output_parsers.yaml.YamlOutputParser

Parse YAML output using a pydantic model.

Functions

output_parsers.loading.load_output_parser(config)

Load an output parser.