omniai-google 3.4.3 → 3.5.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.
- checksums.yaml +4 -4
- data/lib/omniai/google/chat.rb +9 -8
- data/lib/omniai/google/version.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: 33134e75816a15602fef0394b0be7527930e7bb8f3b8469e5b0acbe7f93edf23
|
|
4
|
+
data.tar.gz: 1ce3168ea82a7a943e1c6537839b2cec9286bd8684e80e873aca4133ed326c49
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6f3f3f81fa30d51fc892c09f5d13ff00c438b0f064549447a08a25cc814d52650e32ce2140c74b7fdbbdac80b94d8d210ac74978fe4e931837663fa43ae85cd
|
|
7
|
+
data.tar.gz: b2a5c9217496e893385f617c6250448ad8edfddb4aa6274deeab3e516044aa30e82ece923d2d64eaf4720218195cddfe7f6f07778985d8073063212c52f762e2
|
data/lib/omniai/google/chat.rb
CHANGED
|
@@ -17,11 +17,12 @@ module OmniAI
|
|
|
17
17
|
GEMINI_1_5_PRO = "gemini-1.5-pro"
|
|
18
18
|
GEMINI_2_5_PRO = "gemini-2.5-pro"
|
|
19
19
|
GEMINI_3_0_PRO = "gemini-3-pro-preview"
|
|
20
|
+
GEMINI_3_1_PRO = "gemini-3.1-pro-preview"
|
|
20
21
|
GEMINI_1_5_FLASH = "gemini-1.5-flash"
|
|
21
22
|
GEMINI_2_0_FLASH = "gemini-2.0-flash"
|
|
22
23
|
GEMINI_2_5_FLASH = "gemini-2.5-flash"
|
|
23
24
|
GEMINI_3_FLASH = "gemini-3-flash-preview"
|
|
24
|
-
GEMINI_PRO =
|
|
25
|
+
GEMINI_PRO = GEMINI_3_1_PRO
|
|
25
26
|
GEMINI_FLASH = GEMINI_3_FLASH
|
|
26
27
|
end
|
|
27
28
|
|
|
@@ -132,7 +133,7 @@ module OmniAI
|
|
|
132
133
|
end
|
|
133
134
|
|
|
134
135
|
data[:temperature] = @temperature if @temperature
|
|
135
|
-
data[:thinkingConfig] = thinking_config if
|
|
136
|
+
data[:thinkingConfig] = thinking_config if @options[:thinking]
|
|
136
137
|
|
|
137
138
|
data = data.compact
|
|
138
139
|
data unless data.empty?
|
|
@@ -148,17 +149,17 @@ module OmniAI
|
|
|
148
149
|
stream? ? "streamGenerateContent" : "generateContent"
|
|
149
150
|
end
|
|
150
151
|
|
|
151
|
-
# Translates unified thinking option to Google's thinkingConfig format.
|
|
152
|
-
# Example: `thinking: true` becomes `{ includeThoughts: true }`
|
|
153
152
|
# @return [Hash, nil]
|
|
154
153
|
def thinking_config
|
|
155
154
|
thinking = @options[:thinking]
|
|
156
155
|
return unless thinking
|
|
156
|
+
return { includeThoughts: true } unless thinking.is_a?(Hash)
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
config = { includeThoughts: true }
|
|
159
|
+
return config.merge(thinking) unless thinking.key?(:effort)
|
|
160
|
+
|
|
161
|
+
config[:thinkingLevel] = thinking[:effort].upcase if thinking[:effort]
|
|
162
|
+
config
|
|
162
163
|
end
|
|
163
164
|
|
|
164
165
|
# @return [Array<Message>]
|