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-coreLanguage models

    Language models

    Classes

    Class

    BaseChatModel

    Base class for chat models.

    Class

    BaseMessage

    Base abstract message class.

    Messages are the inputs and outputs of a chat model.

    Examples include HumanMessage, AIMessage, and

    Class

    BaseMessageChunk

    Message chunk, which can be concatenated with other Message chunks.

    Class

    GenericFakeChatModel

    Generic fake chat model that can be used to test the chat model interface.

    • Chat model should be usable in both sync and async tests
    • Invokes on_llm_new_token to allow for testing of callback rel
    Class

    ParrotFakeChatModel

    Generic fake chat model that can be used to test the chat model interface.

    • Chat model should be usable in both sync and async tests
    Class

    BaseLanguageModel

    Abstract base class for interfacing with language models.

    All language model wrappers inherited from BaseLanguageModel.

    Class

    LangSmithParams

    LangSmith parameters for tracing.

    Types

    Type

    LanguageModelInput

    Input to a language model.

    Type

    LanguageModelOutput

    Output from a language model.

    Constants

    Attribute

    LanguageModelLike

    Input/output interface for a language model.