Class: RetrieverQueryEngine
A query engine that uses a retriever to query an index and then synthesizes the response.
Extends
Implements
Constructors
new RetrieverQueryEngine()
new RetrieverQueryEngine(
retriever
,responseSynthesizer
?,preFilters
?,nodePostprocessors
?):RetrieverQueryEngine
Parameters
• retriever: BaseRetriever
• responseSynthesizer?: BaseSynthesizer
• preFilters?: unknown
• nodePostprocessors?: BaseNodePostprocessor
[]
Returns
Overrides
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:23
Properties
nodePostprocessors
nodePostprocessors:
BaseNodePostprocessor
[]
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:20
preFilters?
optional
preFilters:unknown
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:21
responseSynthesizer
responseSynthesizer:
BaseSynthesizer
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:19
retriever
retriever:
BaseRetriever
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:18
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
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:47
_getPrompts()
protected
_getPrompts():object
Returns
object
Overrides
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:41
_updatePrompts()
protected
_updatePrompts():void
Returns
void
Overrides
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:45
getPrompts()
getPrompts():
PromptsRecord
Returns
Inherited from
Defined in
packages/core/dist/prompts/index.d.ts:58
query()
query(params)
query(
params
):Promise
<AsyncIterable
<EngineResponse
,any
,any
>>
Query the query engine and get a response.
Parameters
• params: QueryEngineParamsStreaming
Returns
Promise
<AsyncIterable
<EngineResponse
, any
, any
>>
Implementation of
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:75
query(params)
query(
params
):Promise
<EngineResponse
>
Query the query engine and get a response.
Parameters
• params: QueryEngineParamsNonStreaming
Returns
Promise
<EngineResponse
>
Implementation of
Defined in
packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts:78
updatePrompts()
updatePrompts(
prompts
):void
Parameters
• prompts: PromptsRecord
Returns
void
Inherited from
Defined in
packages/core/dist/prompts/index.d.ts:59
validatePrompts()
validatePrompts(
promptsDict
,moduleDict
):void
Parameters
• promptsDict: PromptsRecord
• moduleDict: ModuleRecord
Returns
void
Inherited from
Defined in
packages/core/dist/prompts/index.d.ts:57