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

    Chat LangChain

    What can I help with?

    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.

    OpenAI tool schema reference

    Function

    convert_to_openai_messages

    Convert LangChain messages into OpenAI message dicts.

    Modules

    Module

    function_calling

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

    Module

    mustache

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

    MIT License.

    Module

    formatting

    Utilities for formatting strings.

    Module

    iter

    Utilities for working with iterators.

    Module

    utils

    Generic utility functions.

    Module

    json

    Utilities for JSON.

    Module

    json_schema

    Utilities for JSON Schema.

    Module

    input

    Handle chained inputs.

    Module

    usage

    Usage utilities.

    Module

    html

    Utilities for working with HTML.

    Module

    uuid

    UUID utility functions.

    This module exports a uuid7 function to generate monotonic, time-ordered UUIDs for tracing and similar operations.

    Module

    aiter

    Asynchronous iterator utilities.

    Adapted from https://github.com/maxfischer2781/asyncstdlib/blob/master/asyncstdlib/itertools.py MIT License.

    Module

    interactive_env

    Utilities for working with interactive environments.

    Module

    image

    Utilities for image processing.

    Module

    pydantic

    Utilities for pydantic.

    Module

    env

    Utilities for environment variables.

    Module

    strings

    String utilities.