Class: SubQuestionQueryEngine
SubQuestionQueryEngine decomposes a question into subquestions and then
Implements
Constructors
constructor
• new SubQuestionQueryEngine(init
)
Parameters
Name | Type |
---|---|
init | Object |
init.queryEngineTools | QueryEngineTool [] |
init.questionGen | BaseQuestionGenerator |
init.responseSynthesizer | BaseSynthesizer |
Defined in
packages/core/src/QueryEngine.ts:126
Properties
metadatas
• metadatas: ToolMetadata
[]
Defined in
packages/core/src/QueryEngine.ts:124
queryEngines
• queryEngines: Record
<string
, BaseQueryEngine
>
Defined in
packages/core/src/QueryEngine.ts:123
questionGen
• questionGen: BaseQuestionGenerator
Defined in
packages/core/src/QueryEngine.ts:122
responseSynthesizer
• responseSynthesizer: BaseSynthesizer
Defined in
packages/core/src/QueryEngine.ts:121
Methods
query
▸ query(params
): Promise
<AsyncIterable
<Response
>>
Query the query engine and get a response.
Parameters
Name | Type |
---|---|
params | QueryEngineParamsStreaming |
Returns
Promise
<AsyncIterable
<Response
>>
Implementation of
Defined in
packages/core/src/QueryEngine.ts:167
▸ query(params
): Promise
<Response
>
Parameters
Name | Type |
---|---|
params | QueryEngineParamsNonStreaming |
Returns
Promise
<Response
>
Implementation of
Defined in
packages/core/src/QueryEngine.ts:168
querySubQ
▸ Private
querySubQ(subQ
, parentEvent?
): Promise
<null
| NodeWithScore
<Metadata
>>
Parameters
Name | Type |
---|---|
subQ | SubQuestion |
parentEvent? | Event |
Returns
Promise
<null
| NodeWithScore
<Metadata
>>
Defined in
packages/core/src/QueryEngine.ts:212
fromDefaults
▸ Static
fromDefaults(init
): SubQuestionQueryEngine
Parameters
Name | Type |
---|---|
init | Object |
init.queryEngineTools | QueryEngineTool [] |
init.questionGen? | BaseQuestionGenerator |
init.responseSynthesizer? | BaseSynthesizer |
init.serviceContext? | ServiceContext |