mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-20 13:54:36 +01:00
Miscellaneous Fixes (#20848)
* Fix filtering for classification * Adjust prompt to account for response tokens * Correctly return response for reprocess * Use API response to update data instead of trying to re-parse all of the values * Implement rename class api * Fix model deletion / rename dialog * Remove camera spatial context * Catch error
This commit is contained in:
@@ -90,7 +90,8 @@ class ReviewDescriptionProcessor(PostProcessorApi):
|
||||
pixels_per_image = width * height
|
||||
tokens_per_image = pixels_per_image / 1250
|
||||
prompt_tokens = 3500
|
||||
available_tokens = context_size * 0.98 - prompt_tokens
|
||||
response_tokens = 300
|
||||
available_tokens = context_size - prompt_tokens - response_tokens
|
||||
max_frames = int(available_tokens / tokens_per_image)
|
||||
|
||||
return min(max(max_frames, 3), 20)
|
||||
@@ -458,7 +459,6 @@ def run_analysis(
|
||||
genai_config.preferred_language,
|
||||
genai_config.debug_save_thumbnails,
|
||||
genai_config.activity_context_prompt,
|
||||
genai_config.camera_context,
|
||||
)
|
||||
review_inference_speed.update(datetime.datetime.now().timestamp() - start)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user