I am new to Open AI and want to create a simple prototype of a RoR application which runs a generative chatbot. I have created my web app and have imported the
gem ‘openai’ in my Gemfile. I have also created an initializer and set it with my API key thus.
OpenAI.api_key = ENV[‘my-key’]
However, when I try to do a dev start, I get the following error:
undefined method `api_key=’ for OpenAI:Module (NoMethodError)
I have tried running bundle install multiple times but it does not fix the issue.