Constructs a new DocumentCollection instance.
The Zep client instance.
The parameters for the document collection.
Optional
created_Optional
descriptionOptional
document_Optional
document_Optional
embedding_Optional
is_Optional
is_Optional
is_Optional
metadataOptional
updated_Optional
uuidReturns the status of the document collection.
The status of the document collection. "ready" if all documents are embedded, "pending" otherwise.
Adds documents to the collection.
The documents to add.
A promise that resolves to an array of document UUIDs.
If the collection name is not provided or no documents are provided.
If the request fails.
Creates an index for the collection.
Optional
force: booleanWhether to force index creation even if there are less than MIN_DOCS_TO_INDEX documents.
A promise that resolves when the index is created.
If the collection name is not provided or the collection has less than MIN_DOCS_TO_INDEX documents and force is not true.
If the request fails.
Deletes a document from the collection.
The uuid of the document to delete.
A promise that resolves when the document is deleted.
If the collection name is not provided or the document does not have a uuid.
If the request fails.
If the request no document is found for the given uuid.
Gets a document from the collection.
The uuid of the document to get.
A promise that resolves to the document.
If the collection name is not provided or the document does not have a uuid.
If the request fails.
If the request no document is found for the given uuid.
Gets multiple documents from the collection.
The uuids of the documents to get.
A promise that resolves to an array of documents.
If any of the documents do not match the expected format.
If the collection name is not provided or no uuids are provided.
If the request fails.
Searches the collection.
The search query.
Optional
limit: numberThe maximum number of results to return.
A promise that resolves to an array of documents.
If the collection name is not provided or the search query does not have at least one of text, embedding, or metadata.
If the request fails.
Searches the collection and returns the results and the query vector.
The search query.
Optional
limit: numberThe maximum number of results to return.
A promise that resolves to an array of documents and the query vector.
If the collection name is not provided or the search query does not have at least one of text, embedding, or metadata.
If the request fails.
Updates a document in the collection.
The parameters to update the document.
A promise that resolves when the document is updated.
If the collection name is not provided or the document does not have a uuid.
If the request fails.
If the request no document is found for the given uuid.
DocumentCollection extends DocumentCollectionModel. It provides methods to interact with a Zep document collection.