api_key instead of access_token? And client.audio is also changed?
jikkuatwork opened this issue · 4 comments
jikkuatwork commented
Did the API change?
Unlike in README, now it requires api_key instead of access_token?
Also, audio is not working?
require "openai"
client = OpenAI::Client.new(api_key: ENV["OPENAI_API_KEY"])
p client.audio
Gives:
❯ r spike.rb
spike.rb:5:in `<main>': undefined method `audio' for an instance of OpenAI::Client (NoMethodError)
p client.audio
^^^^^^
alexrudall commented
There's another gem called openai, could that be installed? If not, what version of ruby-openai are you using?
jikkuatwork commented
Yes! So sorry. I might have mistakenly installed it while trying to update the gem!
alexrudall commented
@jikkuatwork no problem, it happens a lot!
jikkuatwork commented
:)