Skip downloading model if cache exists

This commit is contained in:
Kitaiti Makoto 2026-06-16 17:28:49 +09:00
parent b3a8675911
commit c476f90130
1 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,8 @@ module Whisper
def cache
path = cache_path
return path if cache_path.exist?
headers = {}
headers["if-modified-since"] = path.mtime.httpdate if path.exist?
request @uri, headers