Class: OmniAI::Google::Config

Inherits:
Config
  • Object
show all
Defined in:
lib/omniai/google/config.rb

Overview

Config for the Google ‘api_key` / `host` / `logger` / `version`, `chat_options`.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



9
10
11
12
13
14
15
# File 'lib/omniai/google/config.rb', line 9

def initialize
  super
  @api_key = ENV.fetch('GOOGLE_API_KEY', nil)
  @host = ENV.fetch('GOOGLE_HOST', 'https://generativelanguage.googleapis.com')
  @version = ENV.fetch('GOOGLE_VERSION', 'v1')
  @chat_options = {}
end

Instance Attribute Details

#chat_optionsObject

Returns the value of attribute chat_options.



7
8
9
# File 'lib/omniai/google/config.rb', line 7

def chat_options
  @chat_options
end

#versionObject

Returns the value of attribute version.



7
8
9
# File 'lib/omniai/google/config.rb', line 7

def version
  @version
end