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-classicchainsquery_constructorbaseStructuredQueryOutputParserfrom_components
    Method●Since v1.0

    from_components

    Create a structured query output parser from components.

    Copy
    from_components(
      cls,
      allowed_comparators: Sequence[Comparator] | None = None,
      allowed_operators: Sequence[Operator] | None = None,
      allowed_attributes: Sequence[str] | None = None,
      fix_invalid: bool = False
    ) -> StructuredQueryOutputParser

    Parameters

    NameTypeDescription
    allowed_comparatorsSequence[Comparator] | None
    Default:None

    allowed comparators

    allowed_operatorsSequence[Operator] | None
    Default:None

    allowed operators

    allowed_attributesSequence[str] | None
    Default:None

    allowed attributes

    fix_invalidbool
    Default:False

    whether to fix invalid filter directives

    View source on GitHub