omniai-google 2.3.3 → 2.6.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 +24 -11
- data/lib/omniai/google/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb7d9c573b2db16b5cf0ec251d1d35920d40a8e2ba1a717d50c4001360f05cf0
|
4
|
+
data.tar.gz: 33d8b5af813b07fc0eb1dc8f0bc56b6c1a2033caf9a1a97da3e33ad9b0a14854
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c7ffd48b86af5d634d24795126bbc5ea98284c515f0c5d9de13f48df8ffef98367589cc4c11d062c21f68682fb5ff36b8a8942a82a32f9a515321dc5cb15fc6
|
7
|
+
data.tar.gz: a26d1c8f7348fd97fe4a21234a67387ab11ce5b39c96ba191c6c4abd3d6f61d8ead3f6f16f322b615949f54282ef578baa2e80d072a8c12f7a112b31b31694de
|
data/lib/omniai/google/chat.rb
CHANGED
@@ -18,13 +18,18 @@ module OmniAI
|
|
18
18
|
GEMINI_2_5_PRO = "gemini-2.5-pro-exp-03-25"
|
19
19
|
GEMINI_1_5_FLASH = "gemini-1.5-flash"
|
20
20
|
GEMINI_2_0_FLASH = "gemini-2.0-flash"
|
21
|
+
GEMINI_2_5_FLASH = "gemini-2.5-flash-preview-04-17"
|
21
22
|
GEMINI_PRO = GEMINI_1_5_PRO
|
22
|
-
GEMINI_FLASH =
|
23
|
+
GEMINI_FLASH = GEMINI_2_5_FLASH
|
23
24
|
end
|
24
25
|
|
25
|
-
DEFAULT_MODEL = Model::
|
26
|
+
DEFAULT_MODEL = Model::GEMINI_2_5_FLASH
|
26
27
|
|
27
|
-
|
28
|
+
module ResponseMimeType
|
29
|
+
JSON = "application/json"
|
30
|
+
TEXT = "text/plain"
|
31
|
+
SCHEMA = JSON
|
32
|
+
end
|
28
33
|
|
29
34
|
# @return [Context]
|
30
35
|
CONTEXT = Context.build do |context|
|
@@ -99,14 +104,22 @@ module OmniAI
|
|
99
104
|
|
100
105
|
# @return [Hash]
|
101
106
|
def generation_config
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
107
|
+
data =
|
108
|
+
case @format
|
109
|
+
when :json then { responseMimeType: ResponseMimeType::JSON }
|
110
|
+
when :text then { responseMimeType: ResponseMimeType::TEXT }
|
111
|
+
when OmniAI::Schema::Format
|
112
|
+
{
|
113
|
+
responseMimeType: ResponseMimeType::SCHEMA,
|
114
|
+
responseSchema: @format.schema.serialize,
|
115
|
+
}
|
116
|
+
else {}
|
117
|
+
end
|
118
|
+
|
119
|
+
data[:temperature] = @temperature if @temperature
|
120
|
+
|
121
|
+
data = data.compact
|
122
|
+
data unless data.empty?
|
110
123
|
end
|
111
124
|
|
112
125
|
# @return [String]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniai-google
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Sylvestre
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-05-08 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: event_stream_parser
|
@@ -43,14 +43,14 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '2.
|
46
|
+
version: '2.6'
|
47
47
|
type: :runtime
|
48
48
|
prerelease: false
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '2.
|
53
|
+
version: '2.6'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: zeitwerk
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|