본문으로 건너뛰기

Class: SubQuestionQueryEngine

SubQuestionQueryEngine decomposes a question into subquestions and then

Hierarchy

Implements

Constructors

constructor

new SubQuestionQueryEngine(init): SubQuestionQueryEngine

Parameters

NameType
initObject
init.queryEngineToolsBaseTool<any>[]
init.questionGenBaseQuestionGenerator
init.responseSynthesizerBaseSynthesizer

Returns

SubQuestionQueryEngine

Overrides

PromptMixin.constructor

Defined in

packages/core/src/engines/query/SubQuestionQueryEngine.ts:33

Properties

metadatas

metadatas: ToolMetadata[]

Defined in

packages/core/src/engines/query/SubQuestionQueryEngine.ts:31


queryEngines

queryEngines: BaseTool<any>[]

Defined in

packages/core/src/engines/query/SubQuestionQueryEngine.ts:30


questionGen

questionGen: BaseQuestionGenerator

Defined in

packages/core/src/engines/query/SubQuestionQueryEngine.ts:29


responseSynthesizer

responseSynthesizer: BaseSynthesizer

Defined in

packages/core/src/engines/query/SubQuestionQueryEngine.ts:28

Methods

_getPromptModules

_getPromptModules(): Record<string, any>

Returns

Record<string, any>

Overrides

PromptMixin._getPromptModules

Defined in

packages/core/src/engines/query/SubQuestionQueryEngine.ts:47


_getPrompts

_getPrompts(): PromptsDict

Returns

PromptsDict

Inherited from

PromptMixin._getPrompts

Defined in

packages/core/src/prompts/Mixin.ts:78


_updatePrompts

_updatePrompts(promptsDict): void

Parameters

NameType
promptsDictPromptsDict

Returns

void

Inherited from

PromptMixin._updatePrompts

Defined in

packages/core/src/prompts/Mixin.ts:86


getPrompts

getPrompts(): PromptsDict

Returns all prompts from the mixin and its modules

Returns

PromptsDict

Inherited from

PromptMixin.getPrompts

Defined in

packages/core/src/prompts/Mixin.ts:27


query

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

Query the query engine and get a response.

Parameters

NameType
paramsQueryEngineParamsStreaming

Returns

Promise<AsyncIterable<Response>>

Implementation of

QueryEngine.query

Defined in

packages/core/src/engines/query/SubQuestionQueryEngine.ts:77

query(params): Promise<Response>

Parameters

NameType
paramsQueryEngineParamsNonStreaming

Returns

Promise<Response>

Implementation of

QueryEngine.query

Defined in

packages/core/src/engines/query/SubQuestionQueryEngine.ts:78


querySubQ

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

Parameters

NameType
subQSubQuestion

Returns

Promise<null | NodeWithScore<Metadata>>

Defined in

packages/core/src/engines/query/SubQuestionQueryEngine.ts:106


updatePrompts

updatePrompts(promptsDict): void

Updates the prompts in the mixin and its modules

Parameters

NameType
promptsDictPromptsDict

Returns

void

Inherited from

PromptMixin.updatePrompts

Defined in

packages/core/src/prompts/Mixin.ts:48


validatePrompts

validatePrompts(promptsDict, moduleDict): void

Validates the prompt keys and module keys

Parameters

NameType
promptsDictPromptsDict
moduleDictModuleDict

Returns

void

Inherited from

PromptMixin.validatePrompts

Defined in

packages/core/src/prompts/Mixin.ts:10


fromDefaults

fromDefaults(init): SubQuestionQueryEngine

Parameters

NameType
initObject
init.queryEngineToolsBaseTool<any>[]
init.questionGen?BaseQuestionGenerator
init.responseSynthesizer?BaseSynthesizer
init.serviceContext?ServiceContext

Returns

SubQuestionQueryEngine

Defined in

packages/core/src/engines/query/SubQuestionQueryEngine.ts:54