|
58 | 58 | broker=settings.celery_broker_url, |
59 | 59 | backend=settings.celery_result_backend, |
60 | 60 | broker_connection_retry_on_startup=True, |
61 | | - # To store the tasks args too in results and make the |
| 61 | + # To store the tasks args too in results and make the |
62 | 62 | # V2 API work |
63 | 63 | result_extended=True, |
64 | 64 | ) |
@@ -309,7 +309,13 @@ def task_failure_handler(task_id, exception=None, **kwargs): |
309 | 309 | def summarize_transcription_internals( |
310 | 310 | *, owner_id: str, transcript: str, session_id: str |
311 | 311 | ) -> str: |
312 | | - """Generate a summary from the provided transcription text.""" |
| 312 | + """Generate a summary from the provided transcription text. |
| 313 | +
|
| 314 | + 1. Uses an LLM to generate a TL;DR summary of the transcription. |
| 315 | + 2. Breaks the transcription into parts and summarizes each part. |
| 316 | + 3. Cleans up the combined summary |
| 317 | + 4. Generates next steps. |
| 318 | + """ |
313 | 319 | logger.info( |
314 | 320 | "Starting summarization task | Owner: %s", |
315 | 321 | owner_id, |
@@ -391,11 +397,8 @@ def summarize_transcription( |
391 | 397 | """Generate a summary from the provided transcription text. |
392 | 398 |
|
393 | 399 | This Celery task performs the following operations: |
394 | | - 1. Uses an LLM to generate a TL;DR summary of the transcription. |
395 | | - 2. Breaks the transcription into parts and summarizes each part. |
396 | | - 3. Cleans up the combined summary |
397 | | - 4. Generates next steps. |
398 | | - 5. Sends the final summary via webhook. |
| 400 | + 1. Run summary internals |
| 401 | + 2. Sends the final summary via webhook. |
399 | 402 | """ |
400 | 403 | summary = summarize_transcription_internals( |
401 | 404 | owner_id=owner_id, transcript=transcript, session_id=self.request.id |
@@ -521,11 +524,8 @@ def summarize_v2_task( |
521 | 524 | """Generate a summary from the provided content. |
522 | 525 |
|
523 | 526 | This Celery task performs the following operations: |
524 | | - 1. Uses an LLM to generate a TL;DR summary of the content. |
525 | | - 2. Breaks the content into parts and summarizes each part. |
526 | | - 3. Cleans up the combined summary |
527 | | - 4. Generates next steps. |
528 | | - 5. Sends the final summary via webhook. |
| 527 | + 1. Run summary internals |
| 528 | + 2. Sends the final summary via webhook. |
529 | 529 | """ |
530 | 530 | payload = SummarizeTaskV2Payload.model_validate(payload) |
531 | 531 | summary = summarize_transcription_internals( |
|
0 commit comments