fix error
This commit is contained in:
Ammar 2025-11-29 06:15:05 +02:00 committed by GitHub
parent 2e6d417d02
commit d76e56a66f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -162,7 +162,7 @@ class OpenaiChat(AsyncAuthedProvider, ProviderModelMixin):
hasher.update(data_bytes)
image_hash = hasher.hexdigest()
cache_file = ImagesCache.get(image_hash)
if cls.image_cache and file:
if cls.image_cache and cache_file:
debug.log("Using cached image")
return ImageRequest(cache_file)
extension, mime_type = detect_file_type(data_bytes)