mirror of
https://github.com/langgenius/dify.git
synced 2026-03-21 14:28:26 +08:00
[autofix.ci] apply automated fixes
This commit is contained in:
@ -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]
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user