lib/gen_ai/language/open_ai.rb in gen-ai-0.1.0 vs lib/gen_ai/language/open_ai.rb in gen-ai-0.2.0
- old
+ new
@@ -6,10 +6,10 @@
EMBEDDING_MODEL = 'text-embedding-ada-002'
COMPLETION_MODEL = 'gpt-3.5-turbo'
def initialize(token:, options: {})
depends_on 'ruby-openai'
- @provider = :openai
+
@client = ::OpenAI::Client.new(access_token: token)
end
def embed(input, model: nil)
parameters = { input: input, model: model || EMBEDDING_MODEL }