Skip to content

Commit

Permalink
using gen-ai gem
Browse files Browse the repository at this point in the history
  • Loading branch information
BlazingRockStorm committed Oct 18, 2024
1 parent e65f403 commit e50f0e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

source 'https://rubygems.org'

gem 'gemini-ai', '~> 4.2.0'
gem 'gen-ai', '~> 0.4.2'
gem 'dotenv'
5 changes: 3 additions & 2 deletions lib/main.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require 'dotenv/load'
require 'gemini-ai'
require 'gen_ai'

# With an API key
client = Gemini.new(
Expand Down Expand Up @@ -49,3 +48,5 @@
.join

puts mail_template
model = GenAI::Language.new(:gemini, ENV['GOOGLE_GEMINI_TOKEN'])
model.chat("日報例文を書いてください")

0 comments on commit e50f0e8

Please sign in to comment.