openai.rb
openai.rb copied to clipboard
Caching silently does not work for invalid path
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