Saltar al contenido principal

Class: SubQuestionQueryEngine

SubQuestionQueryEngine decomposes a question into subquestions and then

Implements

Constructors

constructor

new SubQuestionQueryEngine(init): SubQuestionQueryEngine

Parameters

NameType
initObject
init.queryEngineToolsQueryEngineTool[]
init.questionGenBaseQuestionGenerator
init.responseSynthesizerBaseSynthesizer

Returns

SubQuestionQueryEngine

Defined in

packages/core/src/QueryEngine.ts:102

Properties

metadatas

metadatas: ToolMetadata[]

Defined in

packages/core/src/QueryEngine.ts:100


queryEngines

queryEngines: Record<string, BaseQueryEngine>

Defined in

packages/core/src/QueryEngine.ts:99


questionGen

questionGen: BaseQuestionGenerator

Defined in

packages/core/src/QueryEngine.ts:98


responseSynthesizer

responseSynthesizer: BaseSynthesizer

Defined in

packages/core/src/QueryEngine.ts:97

Methods

query

query(params): Promise<AsyncIterable<Response>>

Query the query engine and get a response.

Parameters

NameType
paramsQueryEngineParamsStreaming

Returns

Promise<AsyncIterable<Response>>

Implementation of

BaseQueryEngine.query

Defined in

packages/core/src/QueryEngine.ts:143

query(params): Promise<Response>

Parameters

NameType
paramsQueryEngineParamsNonStreaming

Returns

Promise<Response>

Implementation of

BaseQueryEngine.query

Defined in

packages/core/src/QueryEngine.ts:144


querySubQ

querySubQ(subQ, parentEvent?): Promise<null | NodeWithScore<Metadata>>

Parameters

NameType
subQSubQuestion
parentEvent?Event

Returns

Promise<null | NodeWithScore<Metadata>>

Defined in

packages/core/src/QueryEngine.ts:188


fromDefaults

fromDefaults(init): SubQuestionQueryEngine

Parameters

NameType
initObject
init.queryEngineToolsQueryEngineTool[]
init.questionGen?BaseQuestionGenerator
init.responseSynthesizer?BaseSynthesizer
init.serviceContext?ServiceContext

Returns

SubQuestionQueryEngine

Defined in

packages/core/src/QueryEngine.ts:119