Class: GeminiAi::Configuration
- Inherits:
-
Object
- Object
- GeminiAi::Configuration
- Defined in:
- lib/gemini-ai.rb
Constant Summary collapse
- DEFAULT_SERVICE_VERSION =
'v1'.freeze
- DEFAULT_SERVICE =
'generative-language-api'.freeze
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
34 35 36 37 38 39 40 |
# File 'lib/gemini-ai.rb', line 34 def initialize @api_key = nil @region = nil @file_path = nil @version = DEFAULT_SERVICE_VERSION @service = DEFAULT_SERVICE end |
Instance Attribute Details
#api_key ⇒ Object
42 43 44 |
# File 'lib/gemini-ai.rb', line 42 def api_key @api_key end |
#file_path ⇒ Object
57 58 59 |
# File 'lib/gemini-ai.rb', line 57 def file_path @file_path end |
#region ⇒ Object
61 62 63 |
# File 'lib/gemini-ai.rb', line 61 def region @region end |
#service ⇒ Object
46 47 48 49 50 51 |
# File 'lib/gemini-ai.rb', line 46 def service unless %w[vertex-ai-api generative-language-api].include?(@service) raise Errors::UnsupportedServiceError, "Unsupported service: #{@service}" end @service end |
#version ⇒ Object
53 54 55 |
# File 'lib/gemini-ai.rb', line 53 def version @version end |