openai.rb icon indicating copy to clipboard operation
openai.rb copied to clipboard

Caching silently does not work for invalid path

Open backus opened this issue 2 years ago • 0 comments

Example would be something like

cache_dir = Pathname.new('~/.cache/openai') # Note that this isn't expanded
openai = OpenAI.create(key, cache: cache_dir)

this will just silently not use the cache every time because the cache.directory? check in the OpenAI constructor fails and therefore doesn't wrap in a cache

backus avatar Apr 04 '23 14:04 backus