mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
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:
parent
6f4bf11a32
commit
a4dc84d1ab
3 changed files with 13 additions and 4 deletions
|
|
@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue