From fa54b955e60a11c992a38923672f3f78f9f41183 Mon Sep 17 00:00:00 2001 From: Billy Bao Date: Thu, 11 Dec 2025 19:55:39 +0800 Subject: [PATCH] enable batch --- common/data_source/box_connector.py | 3 ++- rag/svr/sync_data_source.py | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common/data_source/box_connector.py b/common/data_source/box_connector.py index 0eab3ec08..3006e709c 100644 --- a/common/data_source/box_connector.py +++ b/common/data_source/box_connector.py @@ -14,10 +14,11 @@ from common.data_source.models import Document, GenerateDocumentsOutput from common.data_source.utils import get_file_ext class BoxConnector(LoadConnector, PollConnector): - def __init__(self, folder_id: str, batch_size: int = INDEX_BATCH_SIZE, use_marker: bool = False) -> None: + def __init__(self, folder_id: str, batch_size: int = INDEX_BATCH_SIZE, use_marker: bool = True) -> None: self.batch_size = batch_size self.folder_id = "0" if not folder_id else folder_id self.use_marker = use_marker + def load_credentials(self, auth: Any): self.box_client = BoxClient(auth=auth) diff --git a/rag/svr/sync_data_source.py b/rag/svr/sync_data_source.py index 1fe28bfaa..1f94aeec0 100644 --- a/rag/svr/sync_data_source.py +++ b/rag/svr/sync_data_source.py @@ -634,9 +634,7 @@ class BOX(SyncBase): async def _generate(self, task: dict): self.connector = BoxConnector( - batch_size=self.conf.get("batch_size", INDEX_BATCH_SIZE), folder_id=self.conf.get("folder_id", "0"), - use_marker=self.conf.get("use_marker", False) ) credential = json.loads(self.conf['credentials']['box_tokens'])