From 4c5fd13fc3831ca20a72032a96e59ef0823629bc Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sun, 1 Feb 2026 16:04:47 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- api/controllers/console/datasets/datasets_document.py | 5 +---- api/core/rag/index_processor/index_processor_base.py | 2 +- api/services/dataset_service.py | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/api/controllers/console/datasets/datasets_document.py b/api/controllers/console/datasets/datasets_document.py index 92bb6049e1..6a0c9e5f77 100644 --- a/api/controllers/console/datasets/datasets_document.py +++ b/api/controllers/console/datasets/datasets_document.py @@ -1341,10 +1341,7 @@ class DocumentGenerateSummaryApi(Resource): # Update need_summary to True for documents that don't have it set # This handles the case where documents were created when summary_index_setting was disabled - documents_to_update = [ - doc for doc in documents - if not doc.need_summary and doc.doc_form != "qa_model" - ] + documents_to_update = [doc for doc in documents if not doc.need_summary and doc.doc_form != "qa_model"] if documents_to_update: document_ids_to_update = [str(doc.id) for doc in documents_to_update] diff --git a/api/core/rag/index_processor/index_processor_base.py b/api/core/rag/index_processor/index_processor_base.py index 69d4bd6c1e..6e76321ea0 100644 --- a/api/core/rag/index_processor/index_processor_base.py +++ b/api/core/rag/index_processor/index_processor_base.py @@ -58,7 +58,7 @@ class BaseIndexProcessor(ABC): For each segment in preview_texts, generate a summary using LLM and attach it to the segment. The summary can be stored in a new attribute, e.g., summary. This method should be implemented by subclasses. - + Args: tenant_id: Tenant ID preview_texts: List of preview details to generate summaries for diff --git a/api/services/dataset_service.py b/api/services/dataset_service.py index e5c82a68aa..16945fca6a 100644 --- a/api/services/dataset_service.py +++ b/api/services/dataset_service.py @@ -1390,9 +1390,7 @@ class DocumentService: return documents @staticmethod - def update_documents_need_summary( - dataset_id: str, document_ids: Sequence[str], need_summary: bool = True - ) -> int: + def update_documents_need_summary(dataset_id: str, document_ids: Sequence[str], need_summary: bool = True) -> int: """ Update need_summary field for multiple documents.