diff --git a/frigate/data_processing/post/review_descriptions.py b/frigate/data_processing/post/review_descriptions.py index 7932d56f4..0b12aa1a0 100644 --- a/frigate/data_processing/post/review_descriptions.py +++ b/frigate/data_processing/post/review_descriptions.py @@ -311,6 +311,7 @@ class ReviewDescriptionProcessor(PostProcessorApi): start_ts, end_ts, events_with_context, + self.config.review.genai.preferred_language, self.config.review.genai.debug_save_thumbnails, ) else: diff --git a/frigate/genai/__init__.py b/frigate/genai/__init__.py index 910fc13b9..5e1a74279 100644 --- a/frigate/genai/__init__.py +++ b/frigate/genai/__init__.py @@ -178,6 +178,7 @@ Each line represents a detection state, not necessarily unique individuals. Pare start_ts: float, end_ts: float, events: list[dict[str, Any]], + preferred_language: str | None, debug_save: bool, ) -> str | None: """Generate a summary of review item descriptions over a period of time.""" @@ -232,6 +233,9 @@ Guidelines: for event in events: timeline_summary_prompt += f"\n{event}\n" + if preferred_language: + timeline_summary_prompt += f"\nProvide your answer in {preferred_language}" + if debug_save: with open( os.path.join(