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-coreUtilities

    Utilities

    Functions

    Function

    convert_to_json_schema

    Convert a schema representation to a JSON schema.

    Function

    convert_to_openai_tool

    Convert a tool-like object to an OpenAI tool schema.

    Function

    convert_to_openai_messages

    Convert LangChain messages into OpenAI message dicts.

    Modules

    Module

    formatting

    Utilities for formatting strings.

    Module

    utils

    Generic utility functions.

    Module

    env

    Utilities for environment variables.

    Module

    json_schema

    Utilities for JSON Schema.

    Module

    aiter

    Asynchronous iterator utilities.

    Module

    function_calling

    Methods for creating function specs in the style of OpenAI Functions.

    Module

    interactive_env

    Utilities for working with interactive environments.

    Module

    strings

    String utilities.

    Module

    pydantic

    Utilities for pydantic.

    Module

    json

    Utilities for JSON.

    Module

    image

    Utilities for image processing.

    Module

    input

    Handle chained inputs.

    Module

    usage

    Usage utilities.

    Module

    iter

    Utilities for working with iterators.

    Module

    html

    Utilities for working with HTML.

    Module

    mustache

    Adapted from https://github.com/noahmorrison/chevron.

    Module

    uuid

    UUID utility functions.