diff --git a/ragatouille/RAGPretrainedModel.py b/ragatouille/RAGPretrainedModel.py index 8c52abf..9ef8487 100644 --- a/ragatouille/RAGPretrainedModel.py +++ b/ragatouille/RAGPretrainedModel.py @@ -180,6 +180,7 @@ def index( document_splitter_fn: Optional[Callable] = llama_index_sentence_splitter, preprocessing_fn: Optional[Union[Callable, list[Callable]]] = None, bsize: int = 32, + use_faiss: bool = False, ): """Build an index from a list of documents. @@ -215,6 +216,7 @@ def index( max_document_length=max_document_length, overwrite=overwrite_index, bsize=bsize, + use_faiss=use_faiss, ) def add_to_index( @@ -227,6 +229,7 @@ def add_to_index( document_splitter_fn: Optional[Callable] = llama_index_sentence_splitter, preprocessing_fn: Optional[Union[Callable, list[Callable]]] = None, bsize: int = 32, + use_faiss: bool = False, ): """Add documents to an existing index. @@ -258,6 +261,7 @@ def add_to_index( new_docid_metadata_map=new_docid_metadata_map, index_name=index_name, bsize=bsize, + use_faiss=use_faiss, ) def delete_from_index(