langchain.chains.query_constructor.base.load_query_constructor_chainΒΆ

langchain.chains.query_constructor.base.load_query_constructor_chain(llm: BaseLanguageModel, document_contents: str, attribute_info: List[AttributeInfo], examples: Optional[List] = None, allowed_comparators: Optional[Sequence[Comparator]] = None, allowed_operators: Optional[Sequence[Operator]] = None, enable_limit: bool = False, **kwargs: Any) LLMChain[source]ΒΆ

Load a query constructor chain.

Parameters
  • llm – BaseLanguageModel to use for the chain.

  • document_contents – The contents of the document to be queried.

  • attribute_info – A list of AttributeInfo objects describing the attributes of the document.

  • examples – Optional list of examples to use for the chain.

  • allowed_comparators – An optional list of allowed comparators.

  • allowed_operators – An optional list of allowed operators.

  • enable_limit – Whether to enable the limit operator. Defaults to False.

  • **kwargs –

Returns

A LLMChain that can be used to construct queries.