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

change defaults #124

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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 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