多步查询引擎

class llama_index.query_engine.multistep_query_engine.MultiStepQueryEngine(query_engine: BaseQueryEngine, query_transform: StepDecomposeQueryTransform, response_synthesizer: Optional[ResponseSynthesizer] = None, num_steps: Optional[int] = 3, early_stopping: bool = True, index_summary: str = 'None', stop_fn: Optional[Callable[[Dict], bool]] = None)

Multi-step query engine.

This query engine can operate over an existing base query engine, along with the multi-step query transform.

参数
  • query_engine (BaseQueryEngine) -- A BaseQueryEngine object.

  • query_transform (StepDecomposeQueryTransform) -- A StepDecomposeQueryTransform object.

  • response_synthesizer (Optional[ResponseSynthesizer]) -- A ResponseSynthesizer object.

  • num_steps (Optional[int]) -- Number of steps to run the multi-step query.

  • early_stopping (bool) -- Whether to stop early if the stop function returns True.

  • index_summary (str) -- A string summary of the index.

  • stop_fn (Optional[Callable[[Dict], bool]]) -- A stop function that takes in a dictionary of information and returns a boolean.

llama_index.query_engine.multistep_query_engine.default_stop_fn(stop_dict: Dict) bool

Stop function for multi-step query combiner.