Optional
collectionOptional
collectionOptional
filterOptional
indexOptional
numAdds documents to the Chroma database. The documents are first
converted to vectors using the embeddings
instance, and then added to
the database.
An array of Document
instances to be added to the database.
Optional
options: { Optional. An object containing an array of ids
for the documents.
Optional
ids?: string[]A promise that resolves when the documents have been added to the database.
Adds vectors to the Chroma database. The vectors are associated with the provided documents.
An array of vectors to be added to the database.
An array of Document
instances associated with the vectors.
Optional
options: { Optional. An object containing an array of ids
for the vectors.
Optional
ids?: string[]A promise that resolves with an array of document IDs when the vectors have been added to the database.
Deletes documents from the Chroma database. The documents to be deleted
can be specified by providing an array of ids
or a filter
object.
An object containing either an array of ids
of the documents to be deleted or a filter
object to specify the documents to be deleted.
A promise that resolves when the specified documents have been deleted from the database.
Searches for vectors in the Chroma database that are similar to the
provided query vector. The search can be filtered using the provided
filter
object or the filter
property of the Chroma
instance.
The query vector.
The number of similar vectors to return.
Optional
filter: WhereOptional. A filter
object to filter the search results.
A promise that resolves with an array of tuples, each containing a Document
instance and a similarity score.
Static
fromCreates a new Chroma
instance from an array of Document
instances.
The documents are added to the Chroma database.
An array of Document
instances.
An Embeddings
instance used to generate embeddings for the documents.
A ChromaLibArgs
object containing the configuration for the Chroma database.
A promise that resolves with a new Chroma
instance.
Static
fromCreates a new Chroma
instance from an existing collection in the
Chroma database.
An Embeddings
instance used to generate embeddings for the documents.
A ChromaLibArgs
object containing the configuration for the Chroma database.
A promise that resolves with a new Chroma
instance.
Static
fromCreates a new Chroma
instance from an array of text strings. The text
strings are converted to Document
instances and added to the Chroma
database.
An array of text strings.
An array of metadata objects or a single metadata object. If an array is provided, it must have the same length as the texts
array.
An Embeddings
instance used to generate embeddings for the documents.
A ChromaLibArgs
object containing the configuration for the Chroma database.
A promise that resolves with a new Chroma
instance.
Static
importsGenerated using TypeDoc
The main class that extends the
VectorStore
class. It provides methods for interacting with the Chroma database, such as adding documents, deleting documents, and searching for similar vectors.