Run texts through the embeddings and persist in vectorstore. If the document IDs are passed, the existing documents (if any) will be overwritten with the new ones.
The corresponding documents to be added to the collection.
Optional parameters for adding documents. This may include the IDs and metadata of the documents to be added. Defaults to an empty object.
Add vectors and corresponding documents to a couchbase collection If the document IDs are passed, the existing documents (if any) will be overwritten with the new ones.
The vectors to be added to the collection.
The corresponding documents to be added to the collection.
Optional parameters for adding vectors. This may include the IDs and metadata of the documents to be added. Defaults to an empty object.
Delete documents asynchronously from the collection. This function will attempt to remove each document in the provided list of IDs from the collection. If an error occurs during the deletion of a document, an error will be thrown with the ID of the document and the error message.
An array of document IDs to be deleted from the collection.
Return documents that are most similar to the query.
Query to look up for similar documents
The number of similar documents to return. Defaults to 4.
Optional search filter that are passed to Couchbase search. Defaults to empty object.
fields
: Optional list of fields to include in the
metadata of results. Note that these need to be stored in the index.
If nothing is specified, defaults to all the fields stored in the index.searchOptions
: Optional search options that are passed to Couchbase search. Defaults to empty object.Return documents that are most similar to the vector embedding.
Embedding to look up documents similar to.
The number of similar documents to return. Defaults to 4.
Optional search filter that are passed to Couchbase search. Defaults to empty object.
fields
: Optional list of fields to include in the
metadata of results. Note that these need to be stored in the index.
If nothing is specified, defaults to all the fields stored in the index.searchOptions
: Optional search options that are passed to Couchbase search. Defaults to empty object.Performs a similarity search on the vectors in the Couchbase database and returns the documents and their corresponding scores.
Embedding vector to look up documents similar to.
Number of documents to return. Defaults to 4.
Optional search filter that are passed to Couchbase search. Defaults to empty object.
fields
: Optional list of fields to include in the
metadata of results. Note that these need to be stored in the index.
If nothing is specified, defaults to all the fields stored in the index.searchOptions
: Optional search options that are passed to Couchbase search. Defaults to empty object.If the search operation fails.
Return documents that are most similar to the query with their scores.
Query to look up for similar documents
The number of similar documents to return. Defaults to 4.
Optional search filter that are passed to Couchbase search. Defaults to empty object.
fields
: Optional list of fields to include in the
metadata of results. Note that these need to be stored in the index.
If nothing is specified, defaults to all the fields stored in the index.searchOptions
: Optional search options that are passed to Couchbase search. Defaults to empty object.Static
fromCreate a new CouchbaseVectorStore from a set of documents. This function will initialize a new store, add the documents to it, and then return the store.
The documents to be added to the new store.
The embeddings to be used for the documents.
The configuration for the new CouchbaseVectorStore. This includes the options for adding vectors.
Static
fromCreate a new CouchbaseVectorStore from a set of texts. This function will convert each text and its corresponding metadata into a Document, initialize a new store, add the documents to it, and then return the store.
The texts to be converted into Documents and added to the new store.
The metadata for each text. If an array is passed, each text will have its corresponding metadata. If not, all texts will have the same metadata.
The embeddings to be used for the documents.
The configuration for the new CouchbaseVectorStore. This includes the options for adding vectors.
Static
initializeinitialize class for interacting with the Couchbase database. It extends the VectorStore class and provides methods for adding vectors and documents, and searching for similar vectors. This also verifies the params
object to generate embedding
the fields required to initialize a vector store
Generated using TypeDoc
Class for interacting with the Couchbase database. It extends the VectorStore class and provides methods for adding vectors and documents, and searching for similar vectors. Initiate the class using initialize() method.