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

Commit

Permalink
Merge pull request #124 from pinecone-io/increase-upsert-defaults
Browse files Browse the repository at this point in the history
change defaults
  • Loading branch information
acatav authored Oct 30, 2023
2 parents b7a35f8 + 2ac5b84 commit aa7424a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ chat_engine:
type: OpenAIRecordEncoder
params:
model_name: text-embedding-ada-002
batch_size: 100
batch_size: 400

chunker:
type: MarkdownChunker
Expand Down
2 changes: 1 addition & 1 deletion src/canopy/knowledge_base/knowledge_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def _query_index(self,
def upsert(self,
documents: List[Document],
namespace: str = "",
batch_size: int = 100,
batch_size: int = 200,
show_progress_bar: bool = False):
"""
Upsert documents into the knowledge base.
Expand Down
2 changes: 1 addition & 1 deletion src/canopy/knowledge_base/record_encoder/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class OpenAIRecordEncoder(DenseRecordEncoder):
def __init__(self,
*,
model_name: str = "text-embedding-ada-002",
batch_size: int = 100,
batch_size: int = 400,
**kwargs):
encoder = OpenAIEncoder(model_name)
super().__init__(dense_encoder=encoder, batch_size=batch_size, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion src/canopy_server/api_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ContextQueryRequest(BaseModel):

class ContextUpsertRequest(BaseModel):
documents: List[Document]
batch_size: int = 100
batch_size: int = 200


class ContextDeleteRequest(BaseModel):
Expand Down

0 comments on commit aa7424a

Please sign in to comment.