mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
Ensure descriptions saved in chroma are non-empty
This commit is contained in:
parent
176af55e8c
commit
e98b402cdf
@ -126,9 +126,9 @@ class Embeddings:
|
||||
thumbnails["ids"].append(event.id)
|
||||
thumbnails["images"].append(img)
|
||||
thumbnails["metadatas"].append(metadata)
|
||||
if event.data.get("description") is not None:
|
||||
if description := event.data.get("description", "").strip():
|
||||
descriptions["ids"].append(event.id)
|
||||
descriptions["documents"].append(event.data["description"])
|
||||
descriptions["documents"].append(description)
|
||||
descriptions["metadatas"].append(metadata)
|
||||
|
||||
if len(thumbnails["ids"]) > 0:
|
||||
|
||||
@ -177,7 +177,7 @@ class EmbeddingMaintainer(threading.Thread):
|
||||
camera_config, thumbnails, metadata
|
||||
)
|
||||
|
||||
if description is None:
|
||||
if not description:
|
||||
logger.debug("Failed to generate description for %s", event.id)
|
||||
return
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user