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

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-coretracerscore
    Moduleā—Since v0.2

    core

    Utilities for the root listener.

    Attributes

    Functions

    Classes

    View source on GitHub
    attribute
    Run: RunTree
    attribute
    logger
    attribute
    SCHEMA_FORMAT_TYPE: Literal['original', 'streaming_events']
    function
    dumpd
    class
    TracerException
    class
    Document
    class
    BaseMessage
    class
    ChatGeneration
    class
    ChatGenerationChunk
    class
    GenerationChunk
    class
    LLMResult

    Return a dict representation of an object.

    Base class for exceptions in tracers module.

    Class for storing a piece of text and associated metadata.

    Note

    Document is for retrieval workflows, not chat I/O. For sending text to an LLM in a conversation, use message types from langchain.messages.

    Base abstract message class.

    Messages are the inputs and outputs of a chat model.

    Examples include HumanMessage, AIMessage, and SystemMessage.

    A single chat generation output.

    A subclass of Generation that represents the response from a chat model that generates chat messages.

    The message attribute is a structured representation of the chat message. Most of the time, the message will be of type AIMessage.

    Users working with chat models will usually access information via either AIMessage (returned from runnable interfaces) or LLMResult (available via callbacks).

    ChatGeneration chunk.

    ChatGeneration chunks can be concatenated with other ChatGeneration chunks.

    GenerationChunk, which can be concatenated with other Generation chunks.

    A container for results of an LLM call.

    Both chat models and LLMs generate an LLMResult object. This object contains the generated outputs and any additional information that the model provider wants to return.