Ana içeriğe geç

Class: SubQuestionQueryEngine

SubQuestionQueryEngine decomposes a question into subquestions and then

Extends

Implements

Constructors

new SubQuestionQueryEngine()

new SubQuestionQueryEngine(init): SubQuestionQueryEngine

Parameters

init

init.queryEngineTools: BaseTool<any>[]

init.questionGen: BaseQuestionGenerator

init.responseSynthesizer: BaseSynthesizer

Returns

SubQuestionQueryEngine

Overrides

PromptMixin . constructor

Source

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

Properties

metadatas

metadatas: ToolMetadata[]

Source

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


queryEngines

queryEngines: BaseTool<any>[]

Source

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


questionGen

questionGen: BaseQuestionGenerator

Source

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


responseSynthesizer

responseSynthesizer: BaseSynthesizer

Source

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

Methods

_getPromptModules()

protected _getPromptModules(): Record<string, any>

Returns

Record<string, any>

Overrides

PromptMixin . _getPromptModules

Source

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


_getPrompts()

protected _getPrompts(): PromptsDict

Returns

PromptsDict

Inherited from

PromptMixin . _getPrompts

Source

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


_updatePrompts()

protected _updatePrompts(promptsDict): void

Parameters

promptsDict: PromptsDict

Returns

void

Inherited from

PromptMixin . _updatePrompts

Source

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


getPrompts()

getPrompts(): PromptsDict

Returns all prompts from the mixin and its modules

Returns

PromptsDict

Inherited from

PromptMixin . getPrompts

Source

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


query()

query(params)

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

Query the query engine and get a response.

Parameters

params: QueryEngineParamsStreaming

Returns

Promise<AsyncIterable <EngineResponse>>

Implementation of

QueryEngine . query

Source

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

query(params)

query(params): Promise <EngineResponse>

Parameters

params: QueryEngineParamsNonStreaming

Returns

Promise <EngineResponse>

Implementation of

QueryEngine . query

Source

packages/llamaindex/src/engines/query/SubQuestionQueryEngine.ts:80


querySubQ()

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

Parameters

subQ: SubQuestion

Returns

Promise<null | NodeWithScore <Metadata>>

Source

packages/llamaindex/src/engines/query/SubQuestionQueryEngine.ts:108


updatePrompts()

updatePrompts(promptsDict): void

Updates the prompts in the mixin and its modules

Parameters

promptsDict: PromptsDict

Returns

void

Inherited from

PromptMixin . updatePrompts

Source

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


validatePrompts()

validatePrompts(promptsDict, moduleDict): void

Validates the prompt keys and module keys

Parameters

promptsDict: PromptsDict

moduleDict: ModuleDict

Returns

void

Inherited from

PromptMixin . validatePrompts

Source

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


fromDefaults()

static fromDefaults(init): SubQuestionQueryEngine

Parameters

init

init.queryEngineTools: BaseTool<any>[]

init.questionGen?: BaseQuestionGenerator

init.responseSynthesizer?: BaseSynthesizer

init.serviceContext?: ServiceContext

Returns

SubQuestionQueryEngine

Source

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