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-coreexceptionscreate_message
    Function●Since v0.3

    create_message

    Create a message with a link to the LangChain troubleshooting guide.

    Copy
    create_message(
        *,
        message: str,
        error_code: ErrorCode,
    ) -> str

    Example:

    create_message(
        message="Failed to parse output",
        error_code=ErrorCode.OUTPUT_PARSING_FAILURE,
    )
    "Failed to parse output. For troubleshooting, visit: ..."

    Parameters

    NameTypeDescription
    message*str

    The message to display.

    error_code*ErrorCode

    The error code to display.

    View source on GitHub