LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • MCP Adapters
    • Overview
    • Agents
    • Callbacks
    • Chains
    • Chat models
    • Embeddings
    • Evaluation
    • Globals
    • Hub
    • Memory
    • Output parsers
    • Retrievers
    • Runnables
    • LangSmith
    • Storage
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-classicchainsopenai_functionsextractioncreate_extraction_chain_pydantic
    Function●Since v1.0Deprecated

    create_extraction_chain_pydantic

    Creates a chain that extracts information from a passage using Pydantic schema.

    Copy
    create_extraction_chain_pydantic(
      pydantic_schema: Any,
      llm: BaseLanguageModel,
      prompt: BasePromptTemplate | None = None,
      verbose: bool = False
    ) -> Chain

    Parameters

    NameTypeDescription
    pydantic_schema*Any

    The Pydantic schema of the entities to extract.

    llm*BaseLanguageModel

    The language model to use.

    promptBasePromptTemplate | None
    Default:None

    The prompt to use for extraction.

    verbosebool
    Default:False

    Whether to run in verbose mode. In verbose mode, some intermediate logs will be printed to the console.

    View source on GitHub