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

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Standard Tests
    Text Splitters
    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

    Classes

    Modules

    View source on GitHub
    class
    BooleanOutputParser
    class
    CombiningOutputParser
    class
    DatetimeOutputParser
    class
    EnumOutputParser
    class
    OutputFixingParser
    class
    PandasDataFrameOutputParser
    class
    RegexParser
    class
    RegexDictParser
    class
    RetryOutputParser
    class
    RetryWithErrorOutputParser
    class
    ResponseSchema
    class
    StructuredOutputParser
    class
    YamlOutputParser
    module
    retry
    module
    list
    module
    loading
    module
    regex_dict
    module
    rail_parser
    module
    prompts
    module
    yaml
    module
    structured
    module
    regex
    module
    format_instructions
    module
    datetime
    module
    openai_functions
    module
    pydantic
    module
    openai_tools
    module
    ernie_functions
    module
    json
    module
    pandas_dataframe
    module
    xml
    module
    combining
    module
    enum
    module
    fix
    module
    boolean

    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).

    Parse the output of an LLM call to a boolean.

    Combine multiple output parsers into one.

    Parse the output of an LLM call to a datetime.

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

    Wrap a parser and try to fix parsing errors.

    Parse an output using Pandas DataFrame format.

    Parse the output of an LLM call using a regex.

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

    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.

    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.

    Schema for a response from a structured output parser.

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

    Parse YAML output using a Pydantic model.