Class: VectorIndexRetriever
VectorIndexRetriever retrieves nodes from a VectorIndex.
Implements
Constructors
constructor
• new VectorIndexRetriever(«destructured»
)
Parameters
Name | Type |
---|---|
«destructured» | Object |
› index | VectorStoreIndex |
› similarityTopK? | number |
Defined in
indices/vectorStore/VectorIndexRetriever.ts:22
Properties
index
• index: VectorStoreIndex
Defined in
indices/vectorStore/VectorIndexRetriever.ts:18
serviceContext
• Private
serviceContext: ServiceContext
Defined in
indices/vectorStore/VectorIndexRetriever.ts:20
similarityTopK
• similarityTopK: number
Defined in
indices/vectorStore/VectorIndexRetriever.ts:19
Methods
getServiceContext
▸ getServiceContext(): ServiceContext
Returns
Implementation of
BaseRetriever.getServiceContext
Defined in
indices/vectorStore/VectorIndexRetriever.ts:69
retrieve
▸ retrieve(query
, parentEvent?
): Promise
<NodeWithScore
[]>
Parameters
Name | Type |
---|---|
query | string |
parentEvent? | Event |
Returns
Promise
<NodeWithScore
[]>