tiny_gemini 2.1.0 → 2.1.1
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 +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 175b20b86e78addef75bb9d649eefc0b28948bc8404ee5d576c0987345cf71b7
|
4
|
+
data.tar.gz: e274e337544f79f5fd77dcb22e0580f5edb0bc1f20d9451a5e8c04ab3cef4141
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca9e748c8b91c4d0a321e2cfc8b739226784286f04f6a2cfa3dcc76fef81a1ba4b89fc89ef4e59eb6dbdefdbb96ff3d55ef467b38a53bbfe4e6083695291f6b1
|
7
|
+
data.tar.gz: ee42d1d339f841fe9021db7c45b5a82c8f7eb7268a387ca9d0454d29b81c94bbda11abb225fbf63c613b2e917af128de99deebe79a5903b8880bea5b5dc9d39a
|
data/lib/tiny_gemini.rb
CHANGED
@@ -79,7 +79,7 @@ class TinyGemini
|
|
79
79
|
raise(TinyGeminiModelError, "No first candidate response in Gemini response") unless first_candidate_response
|
80
80
|
|
81
81
|
text_response = first_candidate_response&.dig('content', 'parts')&.first&.dig('text')&.strip
|
82
|
-
raise(TinyGeminiModelError, "Text response is nil or empty: `#{text_response.inspect}`") if
|
82
|
+
raise(TinyGeminiModelError, "Text response is nil or empty: `#{text_response.inspect}`") if text_response.nil? || text_response.length == 0
|
83
83
|
|
84
84
|
text_response
|
85
85
|
end
|