omniai 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniai/chat.rb +4 -2
- data/lib/omniai/cli/chat_handler.rb +1 -0
- data/lib/omniai/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: 2e94a411496cb1e8f10e775a2a6487de99def946de6a4cc1e6c1c873ce160760
|
4
|
+
data.tar.gz: 5ec7d8ba1b1bbaf67fd3fe633af99b2e4c3d95edc0114313446b8a666bb1f0d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4265b9413acdf6bfe5dde9c4081c9e83b212c7ac51b5a77f3bc4c1dd0d2d6c030f48f3830e431ee2556a1bc58cbef980c98757f714c97192fb88a948743ce1e5
|
7
|
+
data.tar.gz: 2d8ba0d77348b88ccdc064014528ae56c9be5fc14e716ed961c74f8d462b4dac822eacb1f493b28aa65a4178391a19c3f98e1974ca93393153cf9a8e87c09703
|
data/lib/omniai/chat.rb
CHANGED
@@ -99,12 +99,14 @@ module OmniAI
|
|
99
99
|
|
100
100
|
Stream.new(response:).stream! do |chunk|
|
101
101
|
case @stream
|
102
|
-
when IO
|
102
|
+
when IO
|
103
|
+
@stream << chunk.choice.delta.content
|
104
|
+
@stream.flush
|
103
105
|
else @stream.call(chunk)
|
104
106
|
end
|
105
107
|
end
|
106
108
|
|
107
|
-
@stream.
|
109
|
+
@stream.puts if @stream.is_a?(IO)
|
108
110
|
end
|
109
111
|
|
110
112
|
# @return [Array<Hash>]
|
data/lib/omniai/version.rb
CHANGED