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-corerunnablesbaseRunnableget_input_jsonschema
    Method●Since v0.3

    get_input_jsonschema

    Get a JSON schema that represents the input to the Runnable.

    Copy
    get_input_jsonschema(
        self,
        config: RunnableConfig | None = None,
    ) -> dict[str, Any]

    Example:

    from langchain_core.runnables import RunnableLambda
    
    def add_one(x: int) -> int:
        return x + 1
    
    runnable = RunnableLambda(add_one)
    
    print(runnable.get_input_jsonschema())

    Parameters

    NameTypeDescription
    configRunnableConfig | None
    Default:None

    A config to use when generating the schema.

    View source on GitHub