Class: RetrieverQueryEngine
A query engine that uses a retriever to query an index and then synthesizes the response.
Implements
Constructors
constructor
• new RetrieverQueryEngine(retriever
, responseSynthesizer?
, preFilters?
, nodePostprocessors?
): RetrieverQueryEngine
Parameters
Name | Type |
---|---|
retriever | BaseRetriever |
responseSynthesizer? | BaseSynthesizer |
preFilters? | unknown |
nodePostprocessors? | BaseNodePostprocessor [] |
Returns
Defined in
packages/core/src/QueryEngine.ts:33
Properties
nodePostprocessors
• nodePostprocessors: BaseNodePostprocessor
[]
Defined in
packages/core/src/QueryEngine.ts:30
preFilters
• Optional
preFilters: unknown
Defined in
packages/core/src/QueryEngine.ts:31
responseSynthesizer
• responseSynthesizer: BaseSynthesizer
Defined in
packages/core/src/QueryEngine.ts:29
retriever
• retriever: BaseRetriever
Defined in
packages/core/src/QueryEngine.ts:28
Methods
applyNodePostprocessors
▸ applyNodePostprocessors(nodes
): NodeWithScore
<Metadata
>[]
Parameters
Name | Type |
---|---|
nodes | NodeWithScore <Metadata >[] |
Returns
Defined in
packages/core/src/QueryEngine.ts:48
query
▸ query(params
): Promise
<AsyncIterable
<Response
>>
Query the query engine and get a response.
Parameters
Name | Type |
---|---|
params | QueryEngineParamsStreaming |
Returns
Promise
<AsyncIterable
<Response
>>
Implementation of
Defined in
packages/core/src/QueryEngine.ts:65
▸ query(params
): Promise
<Response
>
Parameters
Name | Type |
---|---|
params | QueryEngineParamsNonStreaming |
Returns
Promise
<Response
>
Implementation of
Defined in
packages/core/src/QueryEngine.ts:66
retrieve
▸ retrieve(query
, parentEvent
): Promise
<NodeWithScore
<Metadata
>[]>
Parameters
Name | Type |
---|---|
query | string |
parentEvent | Event |
Returns
Promise
<NodeWithScore
<Metadata
>[]>