Constructor to initialize the required fields
The fields required for initializing the TimeWeightedVectorStoreRetriever
Get relevant documents based on time-weighted relevance
The query to search for
Optional
runManager: anyThe relevant documents
NOTE: When adding documents to a vector store, use addDocuments via retriever instead of directly to the vector store. This is because it is necessary to process the document in prepareDocuments.
The documents to add to vector store in the retriever
Get the memory stream of documents.
The memory stream of documents.
Set the memory stream of documents.
The new memory stream of documents.
Static
lc_
TimeWeightedVectorStoreRetriever retrieves documents based on their time-weighted relevance. ref: https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/retrievers/time_weighted_retriever.py
Example