omniai-google 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniai/google/chat.rb +2 -1
- 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: b2626eef567a04e92b73eaf64a39dc274c2651b479810cd62a94be1a920cf25f
|
4
|
+
data.tar.gz: 8c968e5ca2328ce77e604f91c36607c22ef6572bf2e7633505316fdd6bab93db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c104b92ca09ae4c29285b2ac35e7badd23d2c54e4cb7189b0f1fb2fa1d0ad0cac4770e6c8ceeaaf5468225db52913458e6d4b6b94a0054f5c58735b01a78911d
|
7
|
+
data.tar.gz: a1037ddc9ccc58f84dfba6a094d0c7e1481dbba103e4e4d9f16dfbfb21def59fee61e4c463e96e3807c0763db4920f84934133b66090c9a8d575ac20c4225913
|
data/lib/omniai/google/chat.rb
CHANGED
@@ -36,9 +36,10 @@ module OmniAI
|
|
36
36
|
# MESSAGE_SERIALIZER.call(message)
|
37
37
|
MESSAGE_SERIALIZER = lambda do |message, context:|
|
38
38
|
parts = message.content.is_a?(String) ? [Text.new(message.content)] : message.content
|
39
|
+
role = message.system? ? Role::USER : message.role
|
39
40
|
|
40
41
|
{
|
41
|
-
role
|
42
|
+
role:,
|
42
43
|
parts: parts.map { |part| part.serialize(context:) },
|
43
44
|
}
|
44
45
|
end
|