Module: GeminiExt
- Defined in:
- lib/geminiext.rb,
lib/geminiext/cache.rb
Overview
require ‘geminiext/response_extender’
Defined Under Namespace
Modules: Cache
Constant Summary collapse
- MAX_TOKENS =
ENV.fetch('GEMINI_MAX_TOKENS', 8_192).to_i
Class Method Summary collapse
Class Method Details
.load_config(model: 'gemini-1.5-flash-001') ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/geminiext.rb', line 16 def self.load_config(model: 'gemini-1.5-flash-001') { credentials: { service: 'generative-language-api', api_key: ENV.fetch('GEMINI_API_KEY') }, options: { model:} } end |
.new(model: 'gemini-1.5-flash-001') ⇒ Object
11 12 13 |
# File 'lib/geminiext.rb', line 11 def self.new(model: 'gemini-1.5-flash-001') Gemini.new(load_config(model: model)) end |