Class: RetrieverQueryEngine<Filters>
A query engine that uses a retriever to query an index and then synthesizes the response.
Type parameters
Name | Type |
---|---|
Filters | unknown |
Hierarchy
-
↳
RetrieverQueryEngine
Implements
Constructors
constructor
• new RetrieverQueryEngine<Filters
>(retriever
, responseSynthesizer?
, preFilters?
, nodePostprocessors?
): RetrieverQueryEngine
<Filters
>
Type parameters
Name | Type |
---|---|
Filters | unknown |
Parameters
Name | Type | Default value |
---|---|---|
retriever | BaseRetriever <Filters > | undefined |
responseSynthesizer | BaseSynthesizer | undefined |
preFilters? | Filters | undefined |
nodePostprocessors | BaseNodePostprocessor [] | [] |
Returns
RetrieverQueryEngine
<Filters
>
Overrides
Defined in
packages/core/src/engines/query/RetrieverQueryEngine.ts:25
Properties
nodePostprocessors
• nodePostprocessors: BaseNodePostprocessor
[] = []
Defined in
packages/core/src/engines/query/RetrieverQueryEngine.ts:31
preFilters
• Optional
preFilters: Filters
Defined in
packages/core/src/engines/query/RetrieverQueryEngine.ts:30
responseSynthesizer
• responseSynthesizer: BaseSynthesizer
Defined in
packages/core/src/engines/query/RetrieverQueryEngine.ts:27
retriever
• retriever: BaseRetriever
<Filters
>
Defined in
packages/core/src/engines/query/RetrieverQueryEngine.ts:26
Methods
_getPromptModules
▸ _getPromptModules(): Object
Returns
Object
Name | Type |
---|---|
responseSynthesizer | BaseSynthesizer |
Overrides
Defined in
packages/core/src/engines/query/RetrieverQueryEngine.ts:36
_getPrompts
▸ _getPrompts(): PromptsDict
Returns
PromptsDict
Inherited from
Defined in
packages/core/src/prompts/Mixin.ts:79
_updatePrompts
▸ _updatePrompts(promptsDict
): void
Parameters
Name | Type |
---|---|
promptsDict | PromptsDict |
Returns
void
Inherited from
Defined in
packages/core/src/prompts/Mixin.ts:87
applyNodePostprocessors
▸ applyNodePostprocessors(nodes
, query
): Promise
<NodeWithScore
<Metadata
>[]>
Parameters
Name | Type |
---|---|
nodes | NodeWithScore <Metadata >[] |
query | MessageContent | QueryBundle |
Returns
Promise
<NodeWithScore
<Metadata
>[]>
Defined in
packages/core/src/engines/query/RetrieverQueryEngine.ts:42
getPrompts
▸ getPrompts(): PromptsDict
Returns all prompts from the mixin and its modules
Returns
PromptsDict
Inherited from
Defined in
packages/core/src/prompts/Mixin.ts:27
query
▸ query(params
): Promise
<AsyncIterable
<Response
>>
Query the query engine and get a response.