Added image_sha to store image hashes

This commit is contained in:
Lyncoln
2026-10-21 00:25:02 -04:00
parent e068b38c55
commit 364f4e0842
+7 -2
View File
@@ -1,8 +1,13 @@
import hashlib
def buildImage(response, action, outputs):
if hasattr(action, "image"):
if response is not None:
imagebytes = response.content
outputs[action.image] = imagebytes
image_bytes = response.content
outputs[action.image] = image_bytes
image_sha = hashlib.sha256(image_bytes).hexdigest()
outputs[f"{action.image}_hash"] = image_sha
else:
print("No response received"),