LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • MCP Adapters
    Standard Tests
    Text Splitters
    • Overview
    • Agents
    • Callbacks
    • Chains
    • Chat models
    • Embeddings
    • Evaluation
    • Globals
    • Hub
    • Memory
    • Output parsers
    • Retrievers
    • Runnables
    • LangSmith
    • Storage
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    Standard Tests
    Text Splitters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Language
    Theme
    Pythonlangchain-classicoutput_parsers
    Module●Since v1.0

    output_parsers

    OutputParser classes parse the output of an LLM call.

    Attributes

    attribute
    DEPRECATED_LOOKUP: dict

    Functions

    function
    create_importer

    Create a function that helps retrieve objects from their new locations.

    The goal of this function is to help users transition from deprecated imports to new imports.

    The function will raise deprecation warning on loops using deprecated_lookups or fallback_module.

    Module lookups will import without deprecation warnings (used to speed up imports from large namespaces like llms or chat models).

    This function should ideally only be used with deprecated imports not with existing imports that are valid, as in addition to raising deprecation warnings the dynamic imports can create other issues for developers (e.g., loss of type information, IDE support for going to definition etc).

    Classes

    class
    BooleanOutputParser

    Parse the output of an LLM call to a boolean.

    class
    CombiningOutputParser

    Combine multiple output parsers into one.

    class
    DatetimeOutputParser

    Parse the output of an LLM call to a datetime.

    class
    EnumOutputParser

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

    class
    OutputFixingParser

    Wrap a parser and try to fix parsing errors.

    class
    PandasDataFrameOutputParser

    Parse an output using Pandas DataFrame format.

    class
    RegexParser

    Parse the output of an LLM call using a regex.

    class
    RegexDictParser

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

    class
    RetryOutputParser

    Wrap a parser and try to fix parsing errors.

    Does this by passing the original prompt and the completion to another LLM, and telling it the completion did not satisfy criteria in the prompt.

    class
    RetryWithErrorOutputParser

    Wrap a parser and try to fix parsing errors.

    Does this by passing the original prompt, the completion, AND the error that was raised to another language model and telling it that the completion did not work, and raised the given error. Differs from RetryOutputParser in that this implementation provides the error that was raised back to the LLM, which in theory should give it more information on how to fix it.

    class
    ResponseSchema

    Schema for a response from a structured output parser.

    class
    StructuredOutputParser

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

    class
    YamlOutputParser

    Parse YAML output using a Pydantic model.

    Modules

    module
    structured
    module
    regex_dict
    module
    pandas_dataframe
    module
    pydantic
    module
    combining
    module
    fix
    module
    yaml
    module
    regex
    module
    loading
    module
    datetime
    module
    boolean
    module
    json
    module
    enum
    module
    openai_tools
    module
    prompts
    module
    xml
    module
    ernie_functions
    module
    list
    module
    rail_parser
    module
    openai_functions
    module
    format_instructions
    module
    retry
    View source on GitHub