gemini-ai 1.0.0 → 2.0.0

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: 0504f65df629365e53197cbf3710261a01a5a6bd0bdc72d7ed86ae8435d97c92
4
- data.tar.gz: f5bb325cc4eb668a8d2b0d6e8c4b76b0a3ae88dbc97ba76d329cbdc45a73a93a
3
+ metadata.gz: 790a1c353ecc9e3122fc096f674d50fbd0ef36b4b0f9ab56ef66d180b0a5d4de
4
+ data.tar.gz: 2eac84cb99804362eea89063ea6ed66467af1ffb3a7d4ffd1ab186f7a2842157
5
5
  SHA512:
6
- metadata.gz: 1d2f70d87440b5e6a4cad3f29a961ab53a708c2e5519c600b7dfe6a7335291571bd69b320057bcd4d2dd32e2f60f48fd5a85e55e6e6ece0334b05517fb57415c
7
- data.tar.gz: 004bddaf41f4a3e7a04f496ca31847f44193dd0b12d2446d92a1176241d29ee4d5a20ee7f0b246945f8f1f5277e8032136fc4f4d607042e5c748c0bcec339a0d
6
+ metadata.gz: d82d466e8272ab1919c153d3f68ffb3ab4ebd5a750a3822daef4394a814b36c08c0f114e691cb52a5c830a74a0e9d208cd3d4407227592812f0534655dc5afc1
7
+ data.tar.gz: 7141a1bff79ea92aac09105b84fd9c2d5b68efe5184bf1ca0588dc420c0180ea65cd2fcca000ab0ea2cd00c1be188877f3f97ec6c7410f61bea4c8acf52b475c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gemini-ai (1.0.0)
4
+ gemini-ai (2.0.0)
5
5
  event_stream_parser (~> 1.0)
6
6
  faraday (~> 2.7, >= 2.7.12)
7
7
  googleauth (~> 1.9, >= 1.9.1)
data/README.md CHANGED
@@ -1,21 +1,38 @@
1
1
  # Gemini AI
2
2
 
3
- A Ruby Gem for interacting with [Gemini](https://deepmind.google/technologies/gemini/) through [Vertex AI](https://cloud.google.com/vertex-ai), Google's generative AI service.
3
+ A Ruby Gem for interacting with [Gemini](https://deepmind.google/technologies/gemini/) through [Vertex AI](https://cloud.google.com/vertex-ai) or [AI Studio](https://makersuite.google.com), Google's generative AI services.
4
+
5
+ ![The logo shows a gemstone split into red and blue halves, symbolizing Ruby programming and Gemini AI. It's surrounded by a circuit-like design on a dark blue backdrop.](https://raw.githubusercontent.com/gbaptista/assets/main/gemini-ai/ruby-gemini-ai.png)
4
6
 
5
7
  > _This Gem is designed to provide low-level access to Gemini, enabling people to build abstractions on top of it. If you are interested in more high-level abstractions or more user-friendly tools, you may want to consider [Nano Bots](https://github.com/icebaker/ruby-nano-bots) 💎 🤖._
6
8
 
7
9
  ## TL;DR and Quick Start
8
10
 
9
11
  ```ruby
10
- gem 'gemini-ai', '~> 1.0'
12
+ gem 'gemini-ai', '~> 2.0'
11
13
  ```
12
14
 
13
15
  ```ruby
14
16
  require 'gemini-ai'
15
17
 
18
+ # With an API key
19
+ client = Gemini.new(
20
+ credentials: {
21
+ service: 'generative-language-api',
22
+ api_key: ENV['GOOGLE_API_KEY']
23
+ },
24
+ options: { model: 'gemini-pro', stream: false }
25
+ )
26
+
27
+ # With a Service Account
16
28
  client = Gemini.new(
17
- credentials: { file_path: 'google-credentials.json', project_id: 'PROJECT_ID', region: 'us-east4' },
18
- settings: { model: 'gemini-pro', stream: false }
29
+ credentials: {
30
+ service: 'vertex-ai-api',
31
+ file_path: 'google-credentials.json',
32
+ project_id: 'PROJECT_ID',
33
+ region: 'us-east4'
34
+ },
35
+ options: { model: 'gemini-pro', stream: false }
19
36
  )
20
37
 
21
38
  result = client.stream_generate_content({
@@ -48,7 +65,10 @@ Result:
48
65
  - [TL;DR and Quick Start](#tldr-and-quick-start)
49
66
  - [Index](#index)
50
67
  - [Setup](#setup)
68
+ - [Installing](#installing)
51
69
  - [Credentials](#credentials)
70
+ - [Option 1: API Key](#option-1-api-key)
71
+ - [Option 2: Service Account](#option-2-service-account)
52
72
  - [Required Data](#required-data)
53
73
  - [Usage](#usage)
54
74
  - [Client](#client)
@@ -68,18 +88,31 @@ Result:
68
88
 
69
89
  ## Setup
70
90
 
91
+ ### Installing
92
+
71
93
  ```sh
72
- gem install gemini-ai -v 1.0.0
94
+ gem install gemini-ai -v 2.0.0
73
95
  ```
74
96
 
75
97
  ```sh
76
- gem 'gemini-ai', '~> 1.0'
98
+ gem 'gemini-ai', '~> 2.0'
77
99
  ```
78
100
 
79
101
  ### Credentials
80
102
 
81
103
  > ⚠️ DISCLAIMER: Be careful with what you are doing, and never trust others' code related to this. These commands and instructions alter the level of access to your Google Cloud Account, and running them naively can lead to security risks as well as financial risks. People with access to your account can use it to steal data or incur charges. Run these commands at your own responsibility and due diligence; expect no warranties from the contributors of this project.
82
104
 
105
+ #### Option 1: API Key
106
+
107
+ You need a [Google Cloud](https://console.cloud.google.com) [_Project_](https://cloud.google.com/resource-manager/docs/creating-managing-projects), and then you can generate an API Key through the Google Cloud Console [here](https://console.cloud.google.com/apis/credentials).
108
+
109
+ You also need to enable the _Generative Language API_ service in your Google Cloud Console, which can be done [here](https://console.cloud.google.com/apis/library/generativelanguage.googleapis.com).
110
+
111
+
112
+ Alternatively, you can generate an API Key through _Google AI Studio_ [here](https://makersuite.google.com/app/apikey). However, this approach will automatically create a project for you in your Google Cloud Account.
113
+
114
+ #### Option 2: Service Account
115
+
83
116
  You need a [Google Cloud](https://console.cloud.google.com) [_Project_](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and a [_Service Account_](https://cloud.google.com/iam/docs/service-account-overview) to use [Vertex AI](https://cloud.google.com/vertex-ai) API.
84
117
 
85
118
  After creating them, you need to enable the Vertex AI API for your project by clicking `Enable` here: [Vertex AI API](https://console.cloud.google.com/apis/library/aiplatform.googleapis.com).
@@ -132,14 +165,33 @@ gcloud projects add-iam-policy-binding PROJECT_ID \
132
165
  --role='roles/ml.admin'
133
166
  ```
134
167
 
135
- > ⚠️ DISCLAIMER: Be careful with what you are doing, and never trust others' code related to this. These commands and instructions alter the level of access to your Google Cloud Account, and running them naively can lead to security risks as well as financial risks. People with access to your account can use it to steal data or incur charges. Run these commands at your own responsibility and due diligence; expect no warranties from the contributors of this project.
136
-
137
168
  #### Required Data
138
169
 
139
- After this, you should have all the necessary data and access to use Gemini: a `google-credentials.json` file, a `PROJECT_ID`, and a `REGION`:
170
+ After choosing an option, you should have all the necessary data and access to use Gemini.
171
+
172
+ For API Key:
140
173
 
141
174
  ```ruby
142
175
  {
176
+ service: 'generative-language-api',
177
+ api_key: 'GOOGLE_API_KEY'
178
+ }
179
+ ```
180
+
181
+ Remember that hardcoding your API key in code is unsafe; it's preferable to use environment variables:
182
+
183
+ ```ruby
184
+ {
185
+ service: 'generative-language-api',
186
+ api_key: ENV['GOOGLE_API_KEY']
187
+ }
188
+ ```
189
+
190
+ Alternativelly, for Service Account, a `google-credentials.json` file, a `PROJECT_ID`, and a `REGION`:
191
+
192
+ ```ruby
193
+ {
194
+ service: 'vertex-ai-api',
143
195
  file_path: 'google-credentials.json',
144
196
  project_id: 'PROJECT_ID',
145
197
  region: 'us-east4'
@@ -169,9 +221,24 @@ Create a new client:
169
221
  ```ruby
170
222
  require 'gemini-ai'
171
223
 
224
+ # With an API key
172
225
  client = Gemini.new(
173
- credentials: { file_path: 'google-credentials.json', project_id: 'PROJECT_ID', region: 'us-east4' },
174
- settings: { model: 'gemini-pro', stream: false }
226
+ credentials: {
227
+ service: 'generative-language-api',
228
+ api_key: ENV['GOOGLE_API_KEY']
229
+ },
230
+ options: { model: 'gemini-pro', stream: false }
231
+ )
232
+
233
+ # With a Service Account
234
+ client = Gemini.new(
235
+ credentials: {
236
+ service: 'vertex-ai-api',
237
+ file_path: 'google-credentials.json',
238
+ project_id: 'PROJECT_ID',
239
+ region: 'us-east4'
240
+ },
241
+ options: { model: 'gemini-pro', stream: false }
175
242
  )
176
243
  ```
177
244
 
@@ -210,8 +277,8 @@ Result:
210
277
  You can set up the client to use streaming for all supported endpoints:
211
278
  ```ruby
212
279
  client = Gemini.new(
213
- credentials: { file_path: 'google-credentials.json', project_id: 'PROJECT_ID', region: 'us-east4' },
214
- settings: { model: 'gemini-pro', stream: true }
280
+ credentials: { ... },
281
+ options: { model: 'gemini-pro', stream: true }
215
282
  )
216
283
  ```
217
284
 
@@ -500,11 +567,17 @@ gem build gemini-ai.gemspec
500
567
 
501
568
  gem signin
502
569
 
503
- gem push gemini-ai-1.0.0.gem
570
+ gem push gemini-ai-2.0.0.gem
504
571
  ```
505
572
 
506
573
  ### Updating the README
507
574
 
575
+ Install [Babashka](https://babashka.org):
576
+
577
+ ```sh
578
+ curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | sudo bash
579
+ ```
580
+
508
581
  Update the `template.md` file and then:
509
582
 
510
583
  ```sh
@@ -532,6 +605,8 @@ mlp README.md -p 8076
532
605
 
533
606
  These resources and references may be useful throughout your learning process.
534
607
 
608
+ - [Google AI for Developers](https://ai.google.dev)
609
+ - [Get started with the Gemini API ](https://ai.google.dev/docs)
535
610
  - [Getting Started with the Vertex AI Gemini API with cURL](https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/getting-started/intro_gemini_curl.ipynb)
536
611
  - [Gemini API Documentation](https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/gemini)
537
612
  - [Vertex AI API Documentation](https://cloud.google.com/vertex-ai/docs/reference)
@@ -544,4 +619,4 @@ These resources and references may be useful throughout your learning process.
544
619
 
545
620
  This is not an official Google project, nor is it affiliated with Google in any way.
546
621
 
547
- The software is distributed under the MIT License, which can be found at [https://github.com/gbaptista/gemini-ai/blob/main/LICENSE](https://github.com/gbaptista/gemini-ai/blob/main/LICENSE). This license includes a disclaimer of warranty. Moreover, the authors assume no responsibility for any damage or costs that may result from using this project. Use the Gemini AI Ruby Gem at your own risk.
622
+ This software is distributed under the [MIT License](https://github.com/gbaptista/gemini-ai/blob/main/LICENSE). This license includes a disclaimer of warranty. Moreover, the authors assume no responsibility for any damage or costs that may result from using this project. Use the Gemini AI Ruby Gem at your own risk.
@@ -9,14 +9,27 @@ module Gemini
9
9
  module Controllers
10
10
  class Client
11
11
  def initialize(config)
12
- @authorizer = ::Google::Auth::ServiceAccountCredentials.make_creds(
13
- json_key_io: File.open(config[:credentials][:file_path]),
14
- scope: 'https://www.googleapis.com/auth/cloud-platform'
15
- )
12
+ if config[:credentials][:api_key]
13
+ @authentication = :api_key
14
+ @api_key = config[:credentials][:api_key]
15
+ else
16
+ @authentication = :service_account
17
+ @authorizer = ::Google::Auth::ServiceAccountCredentials.make_creds(
18
+ json_key_io: File.open(config[:credentials][:file_path]),
19
+ scope: 'https://www.googleapis.com/auth/cloud-platform'
20
+ )
21
+ end
16
22
 
17
- @address = "https://#{config[:credentials][:region]}-aiplatform.googleapis.com/v1/projects/#{config[:credentials][:project_id]}/locations/#{config[:credentials][:region]}/publishers/google/models/#{config[:settings][:model]}"
23
+ @address = case config[:credentials][:service]
24
+ when 'vertex-ai-api'
25
+ "https://#{config[:credentials][:region]}-aiplatform.googleapis.com/v1/projects/#{config[:credentials][:project_id]}/locations/#{config[:credentials][:region]}/publishers/google/models/#{config[:options][:model]}"
26
+ when 'generative-language-api'
27
+ "https://generativelanguage.googleapis.com/v1/models/#{config[:options][:model]}"
28
+ else
29
+ raise StandardError, "Unsupported service: #{config[:credentials][:service]}"
30
+ end
18
31
 
19
- @stream = config[:settings][:stream]
32
+ @stream = config[:options][:stream]
20
33
  end
21
34
 
22
35
  def stream_generate_content(payload, stream: nil, &callback)
@@ -26,7 +39,12 @@ module Gemini
26
39
  def request(path, payload, stream: nil, &callback)
27
40
  stream_enabled = stream.nil? ? @stream : stream
28
41
  url = "#{@address}:#{path}"
29
- url += '?alt=sse' if stream_enabled
42
+ params = []
43
+
44
+ params << 'alt=sse' if stream_enabled
45
+ params << "key=#{@api_key}" if @authentication == :api_key
46
+
47
+ url += "?#{params.join('&')}" if params.size.positive?
30
48
 
31
49
  if !callback.nil? && !stream_enabled
32
50
  raise StandardError, 'You are trying to use a block without stream enabled."'
@@ -37,7 +55,10 @@ module Gemini
37
55
  response = Faraday.new.post do |request|
38
56
  request.url url
39
57
  request.headers['Content-Type'] = 'application/json'
40
- request.headers['Authorization'] = "Bearer #{@authorizer.fetch_access_token!['access_token']}"
58
+ if @authentication == :service_account
59
+ request.headers['Authorization'] = "Bearer #{@authorizer.fetch_access_token!['access_token']}"
60
+ end
61
+
41
62
  request.body = payload.to_json
42
63
 
43
64
  if stream_enabled
data/static/gem.rb CHANGED
@@ -3,10 +3,10 @@
3
3
  module Gemini
4
4
  GEM = {
5
5
  name: 'gemini-ai',
6
- version: '1.0.0',
6
+ version: '2.0.0',
7
7
  author: 'gbaptista',
8
8
  summary: "Interact with Google's Gemini AI.",
9
- description: "A Ruby Gem for interacting with Gemini through Vertex AI, Google's generative AI service.",
9
+ description: "A Ruby Gem for interacting with Gemini through Vertex AI or AI Studio, Google's generative AI services.",
10
10
  github: 'https://github.com/gbaptista/gemini-ai',
11
11
  gem_server: 'https://rubygems.org',
12
12
  license: 'MIT',
data/template.md CHANGED
@@ -1,21 +1,38 @@
1
1
  # Gemini AI
2
2
 
3
- A Ruby Gem for interacting with [Gemini](https://deepmind.google/technologies/gemini/) through [Vertex AI](https://cloud.google.com/vertex-ai), Google's generative AI service.
3
+ A Ruby Gem for interacting with [Gemini](https://deepmind.google/technologies/gemini/) through [Vertex AI](https://cloud.google.com/vertex-ai) or [AI Studio](https://makersuite.google.com), Google's generative AI services.
4
+
5
+ ![The logo shows a gemstone split into red and blue halves, symbolizing Ruby programming and Gemini AI. It's surrounded by a circuit-like design on a dark blue backdrop.](https://raw.githubusercontent.com/gbaptista/assets/main/gemini-ai/ruby-gemini-ai.png)
4
6
 
5
7
  > _This Gem is designed to provide low-level access to Gemini, enabling people to build abstractions on top of it. If you are interested in more high-level abstractions or more user-friendly tools, you may want to consider [Nano Bots](https://github.com/icebaker/ruby-nano-bots) 💎 🤖._
6
8
 
7
9
  ## TL;DR and Quick Start
8
10
 
9
11
  ```ruby
10
- gem 'gemini-ai', '~> 1.0'
12
+ gem 'gemini-ai', '~> 2.0'
11
13
  ```
12
14
 
13
15
  ```ruby
14
16
  require 'gemini-ai'
15
17
 
18
+ # With an API key
19
+ client = Gemini.new(
20
+ credentials: {
21
+ service: 'generative-language-api',
22
+ api_key: ENV['GOOGLE_API_KEY']
23
+ },
24
+ options: { model: 'gemini-pro', stream: false }
25
+ )
26
+
27
+ # With a Service Account
16
28
  client = Gemini.new(
17
- credentials: { file_path: 'google-credentials.json', project_id: 'PROJECT_ID', region: 'us-east4' },
18
- settings: { model: 'gemini-pro', stream: false }
29
+ credentials: {
30
+ service: 'vertex-ai-api',
31
+ file_path: 'google-credentials.json',
32
+ project_id: 'PROJECT_ID',
33
+ region: 'us-east4'
34
+ },
35
+ options: { model: 'gemini-pro', stream: false }
19
36
  )
20
37
 
21
38
  result = client.stream_generate_content({
@@ -49,18 +66,31 @@ Result:
49
66
 
50
67
  ## Setup
51
68
 
69
+ ### Installing
70
+
52
71
  ```sh
53
- gem install gemini-ai -v 1.0.0
72
+ gem install gemini-ai -v 2.0.0
54
73
  ```
55
74
 
56
75
  ```sh
57
- gem 'gemini-ai', '~> 1.0'
76
+ gem 'gemini-ai', '~> 2.0'
58
77
  ```
59
78
 
60
79
  ### Credentials
61
80
 
62
81
  > ⚠️ DISCLAIMER: Be careful with what you are doing, and never trust others' code related to this. These commands and instructions alter the level of access to your Google Cloud Account, and running them naively can lead to security risks as well as financial risks. People with access to your account can use it to steal data or incur charges. Run these commands at your own responsibility and due diligence; expect no warranties from the contributors of this project.
63
82
 
83
+ #### Option 1: API Key
84
+
85
+ You need a [Google Cloud](https://console.cloud.google.com) [_Project_](https://cloud.google.com/resource-manager/docs/creating-managing-projects), and then you can generate an API Key through the Google Cloud Console [here](https://console.cloud.google.com/apis/credentials).
86
+
87
+ You also need to enable the _Generative Language API_ service in your Google Cloud Console, which can be done [here](https://console.cloud.google.com/apis/library/generativelanguage.googleapis.com).
88
+
89
+
90
+ Alternatively, you can generate an API Key through _Google AI Studio_ [here](https://makersuite.google.com/app/apikey). However, this approach will automatically create a project for you in your Google Cloud Account.
91
+
92
+ #### Option 2: Service Account
93
+
64
94
  You need a [Google Cloud](https://console.cloud.google.com) [_Project_](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and a [_Service Account_](https://cloud.google.com/iam/docs/service-account-overview) to use [Vertex AI](https://cloud.google.com/vertex-ai) API.
65
95
 
66
96
  After creating them, you need to enable the Vertex AI API for your project by clicking `Enable` here: [Vertex AI API](https://console.cloud.google.com/apis/library/aiplatform.googleapis.com).
@@ -113,14 +143,33 @@ gcloud projects add-iam-policy-binding PROJECT_ID \
113
143
  --role='roles/ml.admin'
114
144
  ```
115
145
 
116
- > ⚠️ DISCLAIMER: Be careful with what you are doing, and never trust others' code related to this. These commands and instructions alter the level of access to your Google Cloud Account, and running them naively can lead to security risks as well as financial risks. People with access to your account can use it to steal data or incur charges. Run these commands at your own responsibility and due diligence; expect no warranties from the contributors of this project.
117
-
118
146
  #### Required Data
119
147
 
120
- After this, you should have all the necessary data and access to use Gemini: a `google-credentials.json` file, a `PROJECT_ID`, and a `REGION`:
148
+ After choosing an option, you should have all the necessary data and access to use Gemini.
149
+
150
+ For API Key:
121
151
 
122
152
  ```ruby
123
153
  {
154
+ service: 'generative-language-api',
155
+ api_key: 'GOOGLE_API_KEY'
156
+ }
157
+ ```
158
+
159
+ Remember that hardcoding your API key in code is unsafe; it's preferable to use environment variables:
160
+
161
+ ```ruby
162
+ {
163
+ service: 'generative-language-api',
164
+ api_key: ENV['GOOGLE_API_KEY']
165
+ }
166
+ ```
167
+
168
+ Alternativelly, for Service Account, a `google-credentials.json` file, a `PROJECT_ID`, and a `REGION`:
169
+
170
+ ```ruby
171
+ {
172
+ service: 'vertex-ai-api',
124
173
  file_path: 'google-credentials.json',
125
174
  project_id: 'PROJECT_ID',
126
175
  region: 'us-east4'
@@ -150,9 +199,24 @@ Create a new client:
150
199
  ```ruby
151
200
  require 'gemini-ai'
152
201
 
202
+ # With an API key
153
203
  client = Gemini.new(
154
- credentials: { file_path: 'google-credentials.json', project_id: 'PROJECT_ID', region: 'us-east4' },
155
- settings: { model: 'gemini-pro', stream: false }
204
+ credentials: {
205
+ service: 'generative-language-api',
206
+ api_key: ENV['GOOGLE_API_KEY']
207
+ },
208
+ options: { model: 'gemini-pro', stream: false }
209
+ )
210
+
211
+ # With a Service Account
212
+ client = Gemini.new(
213
+ credentials: {
214
+ service: 'vertex-ai-api',
215
+ file_path: 'google-credentials.json',
216
+ project_id: 'PROJECT_ID',
217
+ region: 'us-east4'
218
+ },
219
+ options: { model: 'gemini-pro', stream: false }
156
220
  )
157
221
  ```
158
222
 
@@ -191,8 +255,8 @@ Result:
191
255
  You can set up the client to use streaming for all supported endpoints:
192
256
  ```ruby
193
257
  client = Gemini.new(
194
- credentials: { file_path: 'google-credentials.json', project_id: 'PROJECT_ID', region: 'us-east4' },
195
- settings: { model: 'gemini-pro', stream: true }
258
+ credentials: { ... },
259
+ options: { model: 'gemini-pro', stream: true }
196
260
  )
197
261
  ```
198
262
 
@@ -481,11 +545,17 @@ gem build gemini-ai.gemspec
481
545
 
482
546
  gem signin
483
547
 
484
- gem push gemini-ai-1.0.0.gem
548
+ gem push gemini-ai-2.0.0.gem
485
549
  ```
486
550
 
487
551
  ### Updating the README
488
552
 
553
+ Install [Babashka](https://babashka.org):
554
+
555
+ ```sh
556
+ curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | sudo bash
557
+ ```
558
+
489
559
  Update the `template.md` file and then:
490
560
 
491
561
  ```sh
@@ -513,6 +583,8 @@ mlp README.md -p 8076
513
583
 
514
584
  These resources and references may be useful throughout your learning process.
515
585
 
586
+ - [Google AI for Developers](https://ai.google.dev)
587
+ - [Get started with the Gemini API ](https://ai.google.dev/docs)
516
588
  - [Getting Started with the Vertex AI Gemini API with cURL](https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/getting-started/intro_gemini_curl.ipynb)
517
589
  - [Gemini API Documentation](https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/gemini)
518
590
  - [Vertex AI API Documentation](https://cloud.google.com/vertex-ai/docs/reference)
@@ -525,4 +597,4 @@ These resources and references may be useful throughout your learning process.
525
597
 
526
598
  This is not an official Google project, nor is it affiliated with Google in any way.
527
599
 
528
- The software is distributed under the MIT License, which can be found at [https://github.com/gbaptista/gemini-ai/blob/main/LICENSE](https://github.com/gbaptista/gemini-ai/blob/main/LICENSE). This license includes a disclaimer of warranty. Moreover, the authors assume no responsibility for any damage or costs that may result from using this project. Use the Gemini AI Ruby Gem at your own risk.
600
+ This software is distributed under the [MIT License](https://github.com/gbaptista/gemini-ai/blob/main/LICENSE). This license includes a disclaimer of warranty. Moreover, the authors assume no responsibility for any damage or costs that may result from using this project. Use the Gemini AI Ruby Gem at your own risk.
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: 1.0.0
4
+ version: 2.0.0
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-14 00:00:00.000000000 Z
11
+ date: 2023-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: event_stream_parser
@@ -64,8 +64,8 @@ dependencies:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: 1.9.1
67
- description: A Ruby Gem for interacting with Gemini through Vertex AI, Google's generative
68
- AI service.
67
+ description: A Ruby Gem for interacting with Gemini through Vertex AI or AI Studio,
68
+ Google's generative AI services.
69
69
  email:
70
70
  executables: []
71
71
  extensions: []
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  requirements: []
110
- rubygems_version: 3.4.22
110
+ rubygems_version: 3.3.3
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Interact with Google's Gemini AI.