gemini-ai 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36be77448ab7ba00008ac7548c25fdca45b92980762303631de5d6bdbcd2d01a
4
- data.tar.gz: e0772790afa6019424282e8ac665fb0049da13a76ecc43909b147655f6f95a3a
3
+ metadata.gz: 82d91a5c477a7fc770905d37e1980e1e011ac3b8967d956ff8d6b961b0b7e00c
4
+ data.tar.gz: b1b0ef631d90765e8bd468cbee7c5e390d6b17020748bd9d49c8e4335451c3de
5
5
  SHA512:
6
- metadata.gz: e4d6c7391dff2ce75a46e3ceb5c7ef9c07c6cdcfc55477df68be1df2e06f77ff77d795ee6e70abc9ad73001e8dd583d39949a394140b129d08c2db94c2b8f7c4
7
- data.tar.gz: 2acedebdfe562b7b68d19046a2f2b06bec6fbe75768cc7066b7c1e31cb72bc4caa551a8d656ffc6537c714f0d11965f3cc9f74542e7bc9315f0998f35390d5f4
6
+ metadata.gz: 62ad35fe0f262c304944199a37bd042f857966cd794b889ae93a39412cf54340a5caa30a24cdac51ca7cfdba46ac586bab5035725d0ee0be6156d3043d8b10fc
7
+ data.tar.gz: c0b6dc1ead7966c5e7dbb4884a564df0397f3d2e7e9a078a7112159e543e45325b8433e4fa2c70c89b9c13dbd13d94ee4cee411ce16f72aa3238bfe3b3fee86e
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gemini-ai (3.1.0)
4
+ gemini-ai (3.1.1)
5
5
  event_stream_parser (~> 1.0)
6
6
  faraday (~> 2.8, >= 2.8.1)
7
- googleauth (~> 1.9, >= 1.9.1)
7
+ googleauth (>= 1.8, < 3)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -37,7 +37,7 @@ GEM
37
37
  multi_json (1.15.0)
38
38
  os (1.1.4)
39
39
  parallel (1.24.0)
40
- parser (3.2.2.4)
40
+ parser (3.3.0.0)
41
41
  ast (~> 2.4.1)
42
42
  racc
43
43
  pry (0.14.2)
data/README.md CHANGED
@@ -9,7 +9,7 @@ A Ruby Gem for interacting with [Gemini](https://deepmind.google/technologies/ge
9
9
  ## TL;DR and Quick Start
10
10
 
11
11
  ```ruby
12
- gem 'gemini-ai', '~> 3.1.0'
12
+ gem 'gemini-ai', '~> 3.1.1'
13
13
  ```
14
14
 
15
15
  ```ruby
@@ -114,11 +114,11 @@ Result:
114
114
  ### Installing
115
115
 
116
116
  ```sh
117
- gem install gemini-ai -v 3.1.0
117
+ gem install gemini-ai -v 3.1.1
118
118
  ```
119
119
 
120
120
  ```sh
121
- gem 'gemini-ai', '~> 3.1.0'
121
+ gem 'gemini-ai', '~> 3.1.1'
122
122
  ```
123
123
 
124
124
  ### Credentials
@@ -980,7 +980,7 @@ gem build gemini-ai.gemspec
980
980
 
981
981
  gem signin
982
982
 
983
- gem push gemini-ai-3.1.0.gem
983
+ gem push gemini-ai-3.1.1.gem
984
984
  ```
985
985
 
986
986
  ### Updating the README
@@ -44,7 +44,7 @@ module Gemini
44
44
  raise UnsupportedServiceError, "Unsupported service: #{@service}"
45
45
  end
46
46
 
47
- @server_sent_events = config[:options][:server_sent_events]
47
+ @server_sent_events = config.dig(:options, :server_sent_events)
48
48
 
49
49
  @request_options = config.dig(:options, :connection, :request)
50
50
 
@@ -88,7 +88,6 @@ module Gemini
88
88
 
89
89
  response = Faraday.new(request: @request_options) do |faraday|
90
90
  faraday.response :raise_error
91
- faraday.options.timeout = @timeout if @timeout
92
91
  end.post do |request|
93
92
  request.url url
94
93
  request.headers['Content-Type'] = 'application/json'
@@ -119,8 +118,10 @@ module Gemini
119
118
 
120
119
  results << result
121
120
 
122
- parsed_data['candidates'].find do |candidate|
123
- !candidate['finishReason'].nil? && candidate['finishReason'] != ''
121
+ if parsed_data['candidates']
122
+ parsed_data['candidates'].find do |candidate|
123
+ !candidate['finishReason'].nil? && candidate['finishReason'] != ''
124
+ end
124
125
  end
125
126
  end
126
127
  end
data/gemini-ai.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  spec.add_dependency 'event_stream_parser', '~> 1.0'
33
33
  spec.add_dependency 'faraday', '~> 2.8', '>= 2.8.1'
34
- spec.add_dependency 'googleauth', '~> 1.9', '>= 1.9.1'
34
+ spec.add_dependency 'googleauth', '>= 1.8', '< 3'
35
35
 
36
36
  spec.metadata['rubygems_mfa_required'] = 'true'
37
37
  end
data/static/gem.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Gemini
4
4
  GEM = {
5
5
  name: 'gemini-ai',
6
- version: '3.1.0',
6
+ version: '3.1.1',
7
7
  author: 'gbaptista',
8
8
  summary: "Interact with Google's Gemini AI.",
9
9
  description: "A Ruby Gem for interacting with Gemini through Vertex AI, Generative Language API, or AI Studio, Google's generative AI services.",
data/template.md CHANGED
@@ -9,7 +9,7 @@ A Ruby Gem for interacting with [Gemini](https://deepmind.google/technologies/ge
9
9
  ## TL;DR and Quick Start
10
10
 
11
11
  ```ruby
12
- gem 'gemini-ai', '~> 3.1.0'
12
+ gem 'gemini-ai', '~> 3.1.1'
13
13
  ```
14
14
 
15
15
  ```ruby
@@ -77,11 +77,11 @@ Result:
77
77
  ### Installing
78
78
 
79
79
  ```sh
80
- gem install gemini-ai -v 3.1.0
80
+ gem install gemini-ai -v 3.1.1
81
81
  ```
82
82
 
83
83
  ```sh
84
- gem 'gemini-ai', '~> 3.1.0'
84
+ gem 'gemini-ai', '~> 3.1.1'
85
85
  ```
86
86
 
87
87
  ### Credentials
@@ -943,7 +943,7 @@ gem build gemini-ai.gemspec
943
943
 
944
944
  gem signin
945
945
 
946
- gem push gemini-ai-3.1.0.gem
946
+ gem push gemini-ai-3.1.1.gem
947
947
  ```
948
948
 
949
949
  ### Updating the README
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemini-ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - gbaptista
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-26 00:00:00.000000000 Z
11
+ date: 2024-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: event_stream_parser
@@ -48,22 +48,22 @@ dependencies:
48
48
  name: googleauth
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '1.9'
54
51
  - - ">="
55
52
  - !ruby/object:Gem::Version
56
- version: 1.9.1
53
+ version: '1.8'
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: '3'
57
57
  type: :runtime
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
62
- - !ruby/object:Gem::Version
63
- version: '1.9'
64
61
  - - ">="
65
62
  - !ruby/object:Gem::Version
66
- version: 1.9.1
63
+ version: '1.8'
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: '3'
67
67
  description: A Ruby Gem for interacting with Gemini through Vertex AI, Generative
68
68
  Language API, or AI Studio, Google's generative AI services.
69
69
  email: