10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/dspy/gemini/guardrails.rb', line 10
def self.ensure_gemini_installed!
require 'gemini-ai'
spec = Gem.loaded_specs["gemini-ai"]
unless spec && Gem::Requirement.new(SUPPORTED_GEMINI_VERSIONS).satisfied_by?(spec.version)
msg = " DSPY requires `gemini-ai` gem \#{SUPPORTED_GEMINI_VERSIONS}.\n Please Install or upgrade it with `bundle add gemini-ai --version \"\#{SUPPORTED_GEMINI_VERSIONS}\"`.\n MSG\n raise DSPy::LM::UnsupportedVersionError, msg\n end\nend\n"
|