tiny_gemini 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tiny_gemini.rb +2 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 175b20b86e78addef75bb9d649eefc0b28948bc8404ee5d576c0987345cf71b7
4
- data.tar.gz: e274e337544f79f5fd77dcb22e0580f5edb0bc1f20d9451a5e8c04ab3cef4141
3
+ metadata.gz: 7bfafdd6a01938b30daeb9913e8c5e8724158f2d9a55103b25c09d0022717352
4
+ data.tar.gz: 86be29fae744635ae5577ec1492fbaf22eae5f3e074e4f2ce6cd56f01c7916a5
5
5
  SHA512:
6
- metadata.gz: ca9e748c8b91c4d0a321e2cfc8b739226784286f04f6a2cfa3dcc76fef81a1ba4b89fc89ef4e59eb6dbdefdbb96ff3d55ef467b38a53bbfe4e6083695291f6b1
7
- data.tar.gz: ee42d1d339f841fe9021db7c45b5a82c8f7eb7268a387ca9d0454d29b81c94bbda11abb225fbf63c613b2e917af128de99deebe79a5903b8880bea5b5dc9d39a
6
+ metadata.gz: 6c00e093b72af96c3aa992bc8a2a0b99aaa70eaa8dc44eaa631c15ea09953a7ac9013e7402681de2dc3df396711f8ca30b42b7dddeb0db16495aaf4521211dee
7
+ data.tar.gz: 946198664c6ef6d71ada4442d8d8e1ef87e8bb3465b40190c1678235e64ccd8f43adae08ca99a926fd5e83c4631540b71a24ae4ce68c39ed3eaae15afa1cfe25
data/lib/tiny_gemini.rb CHANGED
@@ -56,9 +56,10 @@ class TinyGemini
56
56
  # NOTE: if you want the model to impersonate a character (i.e. a talking cat)
57
57
  # you need to have set the `system_instruction` parameter when initializing
58
58
  # this class to make that work
59
- def prompt(messages)
59
+ def prompt(messages, safety_settings=nil)
60
60
  body = { contents: messages }
61
61
  body.merge!(system_instruction: { parts: { text: @system_instruction } }) if @system_instruction
62
+ body.merge!(safety_settings: safety_settings) if safety_settings
62
63
 
63
64
  request_body = body.to_json
64
65
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_gemini
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Lunt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-01 00:00:00.000000000 Z
11
+ date: 2024-09-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: a tiny gem for using Google Gemini's generative models for chat
14
14
  email: jefflunt@gmail.com