Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Add show_progress_bar flag and set to false #97

Merged
merged 4 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pinecone-client = "^2.2.2"
python-dotenv = "^1.0.0"
openai = "^0.27.5"
tiktoken = "^0.3.3"
pinecone-datasets = "^0.6.1"
pinecone-datasets = "^0.6.2"
pydantic = "^1.10.7"
pinecone-text = { version = "^0.6.0", extras = ["openai"] }
pandas-stubs = "^2.0.3.230814"
Expand Down
6 changes: 4 additions & 2 deletions src/resin/knowledge_base/knowledge_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,8 @@ def _query_index(self,
def upsert(self,
documents: List[Document],
namespace: str = "",
batch_size: int = 100):
batch_size: int = 100,
show_progress_bar: bool = False):
miararoy marked this conversation as resolved.
Show resolved Hide resolved
"""
Upsert documents into the knowledge base.
Upsert operation stands for "update or insert".
Expand Down Expand Up @@ -551,7 +552,8 @@ def upsert(self,
dataset.to_pinecone_index(self._index_name,
namespace=namespace,
should_create_index=False,
batch_size=batch_size)
batch_size=batch_size,
show_progress=show_progress_bar)

def delete(self,
document_ids: List[str],
Expand Down
Loading