Send preferred language for report service

This commit is contained in:
Nicolas Mowen 2025-12-20 05:30:36 -07:00
parent 60052e5f9f
commit 081e47f6d7
2 changed files with 5 additions and 0 deletions

View File

@ -311,6 +311,7 @@ class ReviewDescriptionProcessor(PostProcessorApi):
start_ts, start_ts,
end_ts, end_ts,
events_with_context, events_with_context,
self.config.review.genai.preferred_language,
self.config.review.genai.debug_save_thumbnails, self.config.review.genai.debug_save_thumbnails,
) )
else: else:

View File

@ -178,6 +178,7 @@ Each line represents a detection state, not necessarily unique individuals. Pare
start_ts: float, start_ts: float,
end_ts: float, end_ts: float,
events: list[dict[str, Any]], events: list[dict[str, Any]],
preferred_language: str | None,
debug_save: bool, debug_save: bool,
) -> str | None: ) -> str | None:
"""Generate a summary of review item descriptions over a period of time.""" """Generate a summary of review item descriptions over a period of time."""
@ -232,6 +233,9 @@ Guidelines:
for event in events: for event in events:
timeline_summary_prompt += f"\n{event}\n" timeline_summary_prompt += f"\n{event}\n"
if preferred_language:
timeline_summary_prompt += f"\nProvide your answer in {preferred_language}"
if debug_save: if debug_save:
with open( with open(
os.path.join( os.path.join(