Optional
autoOptional
numOptional
partitionOptional
partitionOptional
partitionAdds documents to the Milvus database.
Array of Document instances to be added to the database.
Optional
options: { Optional parameter that can include specific IDs for the documents.
Optional
ids?: string[]Promise resolving to void.
Adds vectors to the Milvus database.
Array of vectors to be added to the database.
Array of Document instances associated with the vectors.
Optional
options: { Optional parameter that can include specific IDs for the documents.
Optional
ids?: string[]Promise resolving to void.
Creates a VectorStoreRetriever
instance with flexible configuration options.
Optional
kOrFields: number | Partial<VectorStoreRetrieverInput<Milvus>>If a number is provided, it sets the k
parameter (number of items to retrieve).
Optional
filter: stringOptional filter criteria to limit the items retrieved based on the specified filter type.
Optional
callbacks: CallbacksOptional callbacks that may be triggered at specific stages of the retrieval process.
Optional
tags: string[]Tags to categorize or label the VectorStoreRetriever
. Defaults to an empty array if not provided.
Optional
metadata: Record<string, unknown>Additional metadata as key-value pairs to add contextual information for the retrieval process.
Optional
verbose: booleanIf true
, enables detailed logging for the retrieval process. Defaults to false
.
VectorStoreRetriever
instance based on the provided parameters.Creates a collection in the Milvus database.
Array of vectors to be added to the new collection.
Array of Document instances to be added to the new collection.
Promise resolving to void.
Ensures that a collection exists in the Milvus database.
Optional
vectors: number[][]Optional array of vectors to be used if a new collection needs to be created.
Optional
documents: Document<Record<string, any>>[]Optional array of Document instances to be used if a new collection needs to be created.
Promise resolving to void.
Optional
maxReturn documents selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to the query AND diversity among selected documents.
Text to look up documents similar to.
Searches for documents similar to a text query by embedding the query and performing a similarity search on the resulting vector.
Text query for finding similar documents.
Optional
k: numberNumber of similar results to return. Defaults to 4.
Optional
filter: stringOptional filter based on FilterType
.
Optional
_callbacks: CallbacksOptional callbacks for monitoring search progress
A promise resolving to an array of DocumentInterface
instances representing similar documents.
Searches for vectors in the Milvus database that are similar to a given vector.
Vector to compare with the vectors in the database.
Number of similar vectors to return.
Optional
filter: stringOptional filter to apply to the search.
Promise resolving to an array of tuples, each containing a Document instance and a similarity score.
Searches for documents similar to a text query by embedding the query, and returns results with similarity scores.
Text query for finding similar documents.
Optional
k: numberNumber of similar results to return. Defaults to 4.
Optional
filter: stringOptional filter based on FilterType
.
Optional
_callbacks: CallbacksOptional callbacks for monitoring search progress
A promise resolving to an array of tuples, each containing a document and its similarity score.
Static
fromCreates a Milvus instance from a set of Document instances.
Array of Document instances to be added to the database.
Embeddings instance used to generate vector embeddings for the documents.
Optional
dbConfig: MilvusLibArgsOptional configuration for the Milvus database.
Promise resolving to a new Milvus instance.
Static
fromCreates a Milvus instance from an existing collection in the Milvus database.
Embeddings instance used to generate vector embeddings for the documents in the collection.
Configuration for the Milvus database.
Promise resolving to a new Milvus instance.
Static
fromCreates a Milvus instance from a set of texts and their associated metadata.
Array of texts to be added to the database.
Array of metadata objects associated with the texts.
Embeddings instance used to generate vector embeddings for the texts.
Optional
dbConfig: MilvusLibArgsOptional configuration for the Milvus database.
Promise resolving to a new Milvus instance.
Class for interacting with a Milvus database. Extends the VectorStore class.