mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-22 20:18:30 +03:00
Send preferred language for report service
This commit is contained in:
parent
60052e5f9f
commit
081e47f6d7
@ -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:
|
||||||
|
|||||||
@ -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(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user