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_parsersretry
    Module●Since v1.0

    retry

    Attributes

    attribute
    NAIVE_COMPLETION_RETRY: str
    attribute
    NAIVE_COMPLETION_RETRY_WITH_ERROR: str
    attribute
    NAIVE_RETRY_PROMPT
    attribute
    NAIVE_RETRY_WITH_ERROR_PROMPT
    attribute
    T

    Classes

    class
    RetryOutputParserRetryChainInput

    Retry chain input for RetryOutputParser.

    class
    RetryWithErrorOutputParserRetryChainInput

    Retry chain input for RetryWithErrorOutputParser.

    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.

    View source on GitHub