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-classicchainsbaseChainaprep_outputs
    Method●Since v1.0

    aprep_outputs

    Validate and prepare chain outputs, and save info about this run to memory.

    Copy
    aprep_outputs(
      self,
      inputs: dict[str, str],
      outputs: dict[str, str],
      return_only_outputs: bool = False
    ) -> dict[str, str]

    Parameters

    NameTypeDescription
    inputs*dict[str, str]

    Dictionary of chain inputs, including any inputs added by chain memory.

    outputs*dict[str, str]

    Dictionary of initial chain outputs.

    return_only_outputsbool
    Default:False

    Whether to only return the chain outputs. If False, inputs are also added to the final outputs.

    View source on GitHub