LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    โŒ˜I

    Chat LangChain

    What can I help with?

    Enter to sendยทShift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-coreoutput_parsersbaseBaseOutputParseraparse_result
    Methodโ—Since v1.8

    aparse_result

    Copy
    aparse_result(
      self,
      result: list[Generation],
      *,
      partial: bool = False
    )
    View source on GitHub
    ->
    T

    Parameters

    NameTypeDescription
    result*list[Generation]
    partialbool
    Default:False

    Parse a list of candidate model Generation objects into a specific format.

    The return value is parsed from only the first Generation in the result, which is assumed to be the highest-likelihood Generation.

    This method is used by ainvoke and abatch. The default implementation runs parse_result in an executor; it does not call aparse. Override this method to provide native async parsing, for example when using async I/O or clients bound to the caller's event loop. Synchronous parsers can use the default implementation.

    A list of Generation to be parsed.

    The Generation objects are assumed to be different candidate outputs for a single model input.

    Whether to parse the output as a partial result.

    This is useful for parsers that can parse partial results.