tiny_gemini 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tiny_gemini.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bfafdd6a01938b30daeb9913e8c5e8724158f2d9a55103b25c09d0022717352
|
4
|
+
data.tar.gz: 86be29fae744635ae5577ec1492fbaf22eae5f3e074e4f2ce6cd56f01c7916a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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-
|
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
|