asRetriever(
kOrFields: number | Partial<VectorStoreRetrieverInput<AzureCosmosDBNoSQLVectorStore>>,
filter: AzureCosmosDBNoSQLFilterType| Name | Type | Description |
|---|---|---|
kOrFields | number | Partial<VectorStoreRetrieverInput<AzureCosmosDBNoSQLVectorStore>> | If a number is provided, it sets the
|
filter | AzureCosmosDBNoSQLFilterType | Optional filter criteria to limit the items retrieved based on the specified filter type. |
callbacks | Callbacks | |
tags | string[] | |
metadata | Record<string, unknown> | |
verbose | boolean |
Basic usage with a `k` value:
const retriever = myVectorStore.asRetriever(5);Creates a VectorStoreRetriever instance with flexible configuration options.
Optional callbacks that may be triggered at specific stages of the retrieval process.
Tags to categorize or label the VectorStoreRetriever. Defaults to an empty array if not provided.
Additional metadata as key-value pairs to add contextual information for the retrieval process.
If true, enables detailed logging for the retrieval process. Defaults to false.