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-classicsmithevaluationstring_run_evaluatorChainStringRunMapper
    Class●Since v1.0

    ChainStringRunMapper

    Copy
    ChainStringRunMapper()

    Bases

    StringRunMapper

    Attributes

    Methods

    Inherited fromStringRunMapper

    Attributes

    Aoutput_keys: list[str]
    —

    The keys to use for the output.

    Inherited fromSerializable(langchain_core)

    Attributes

    Alc_secretsA
    View source on GitHub
    lc_attributes
    Amodel_config

    Methods

    Mis_lc_serializableMget_lc_namespaceMlc_idMto_jsonMto_json_not_implemented
    attribute
    input_key: str | None
    attribute
    prediction_key: str | None
    method
    map

    Extract items to evaluate from the run object from a chain.

    The key from the model Run's inputs to use as the eval input. If not provided, will use the only input key or raise an error if there are multiple.

    The key from the model Run's outputs to use as the eval prediction. If not provided, will use the only output key or raise an error if there are multiple.

    Maps the Run to a dictionary.