Skip to main content

Class: RetrieverQueryEngine

Extends

Constructors

new RetrieverQueryEngine()

new RetrieverQueryEngine(retriever, responseSynthesizer?, nodePostprocessors?): RetrieverQueryEngine

Parameters

retriever: BaseRetriever

responseSynthesizer?: BaseSynthesizer

nodePostprocessors?: BaseNodePostprocessor[]

Returns

RetrieverQueryEngine

Overrides

BaseQueryEngine.constructor

Defined in

packages/core/query-engine/dist/index.d.ts:40

Properties

nodePostprocessors

nodePostprocessors: BaseNodePostprocessor[]

Defined in

packages/core/query-engine/dist/index.d.ts:39


responseSynthesizer

responseSynthesizer: BaseSynthesizer

Defined in

packages/core/query-engine/dist/index.d.ts:38


retriever

retriever: BaseRetriever

Defined in

packages/core/query-engine/dist/index.d.ts:37

Methods

_getPromptModules()

_getPromptModules(): object

Return a dictionary of sub-modules within the current module that also implement PromptMixin (so that their prompts can also be get/set).

Can be blank if no sub-modules.

Returns

object

responseSynthesizer

responseSynthesizer: BaseSynthesizer

Overrides

BaseQueryEngine._getPromptModules

Defined in

packages/core/query-engine/dist/index.d.ts:44


_getPrompts()

protected _getPrompts(): object

Returns

object

Overrides

BaseQueryEngine._getPrompts

Defined in

packages/core/query-engine/dist/index.d.ts:42


_query()

_query(strOrQueryBundle, stream?): Promise<EngineResponse | AsyncIterable<EngineResponse, any, any>>

Parameters

strOrQueryBundle: QueryType

stream?: boolean

Returns

Promise<EngineResponse | AsyncIterable<EngineResponse, any, any>>

Overrides

BaseQueryEngine._query

Defined in

packages/core/query-engine/dist/index.d.ts:41


_updatePrompts()

protected _updatePrompts(): void

Returns

void

Overrides

BaseQueryEngine._updatePrompts

Defined in

packages/core/query-engine/dist/index.d.ts:43


getPrompts()

getPrompts(): PromptsRecord

Returns

PromptsRecord

Inherited from

BaseQueryEngine.getPrompts

Defined in

packages/core/prompts/dist/index.d.ts:58


query()

query(params)

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

Parameters

params: StreamingQueryParams

Returns

Promise<AsyncIterable<EngineResponse, any, any>>

Inherited from

BaseQueryEngine.query

Defined in

packages/core/query-engine/dist/index.d.ts:32

query(params)

query(params): Promise<EngineResponse>

Parameters

params: NonStreamingQueryParams

Returns

Promise<EngineResponse>

Inherited from

BaseQueryEngine.query

Defined in

packages/core/query-engine/dist/index.d.ts:33


retrieve()

retrieve(query): Promise<NodeWithScore<Metadata>[]>

Parameters

query: QueryType

Returns

Promise<NodeWithScore<Metadata>[]>

Overrides

BaseQueryEngine.retrieve

Defined in

packages/core/query-engine/dist/index.d.ts:48


updatePrompts()

updatePrompts(prompts): void

Parameters

prompts: PromptsRecord

Returns

void

Inherited from

BaseQueryEngine.updatePrompts

Defined in

packages/core/prompts/dist/index.d.ts:59


validatePrompts()

validatePrompts(promptsDict, moduleDict): void

Parameters

promptsDict: PromptsRecord

moduleDict: ModuleRecord

Returns

void

Inherited from

BaseQueryEngine.validatePrompts

Defined in

packages/core/prompts/dist/index.d.ts:57