🔧(summary) add settings to disable summary feature entirely
Introduce FastAPI settings configuration option to completely disable the summary feature. This improves developer experience by allowing developers to skip summary-related setup when not needed for their workflow.
This commit is contained in:
committed by
aleb_the_flash
parent
7004b7e2c8
commit
1b4a144650
@@ -318,7 +318,10 @@ def process_audio_transcribe_summarize_v2(
|
||||
|
||||
metadata_manager.capture(task_id, settings.posthog_event_success)
|
||||
|
||||
if analytics.is_feature_enabled("summary-enabled", distinct_id=sub):
|
||||
if (
|
||||
analytics.is_feature_enabled("summary-enabled", distinct_id=sub)
|
||||
and settings.is_summary_enabled
|
||||
):
|
||||
logger.info("Queuing summary generation task.")
|
||||
summarize_transcription.apply_async(
|
||||
args=[formatted_transcription, email, sub, title],
|
||||
|
||||
@@ -57,6 +57,9 @@ class Settings(BaseSettings):
|
||||
)
|
||||
summary_title_template: Optional[str] = "Résumé de {title}"
|
||||
|
||||
# Summary related settings
|
||||
is_summary_enabled: bool = True
|
||||
|
||||
# Sentry
|
||||
sentry_is_enabled: bool = False
|
||||
sentry_dsn: Optional[str] = None
|
||||
|
||||
Reference in New Issue
Block a user