Skip to content

Commit

Permalink
chore: argument support
Browse files Browse the repository at this point in the history
  • Loading branch information
bclavie committed Mar 15, 2024
1 parent 0fa22ea commit 455b55f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ragatouille/RAGPretrainedModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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(
Expand All @@ -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.
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 455b55f

Please sign in to comment.