feat: add should_summarize parameter to task dispatchers

- Introduced should_summarize parameter in TaskDispatcher and CeleryTaskDispatcher to control summary generation.
- Updated InlineTaskDispatcher to support the new parameter for document processing.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-02-26 19:12:37 -08:00
parent 6f4bf11a32
commit a4dc84d1ab
3 changed files with 13 additions and 4 deletions

View file

@ -64,6 +64,7 @@ class InlineTaskDispatcher:
filename: str,
search_space_id: int,
user_id: str,
should_summarize: bool = False,
) -> None:
from app.tasks.celery_tasks.document_tasks import (
_process_file_with_document,
@ -71,7 +72,12 @@ class InlineTaskDispatcher:
with contextlib.suppress(Exception):
await _process_file_with_document(
document_id, temp_path, filename, search_space_id, user_id
document_id,
temp_path,
filename,
search_space_id,
user_id,
should_summarize=should_summarize,
)