omniai 0.1.2 → 0.1.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/chat/chunk.rb +5 -0
- data/lib/omniai/chat/completion.rb +1 -1
- 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: 7214249d8bda8299971c31dace84132a52f64b1464ff4d28af27f4a0f93221f8
|
4
|
+
data.tar.gz: c52f1ef0038da9fc26901f1838d2497e26febcf564548101a96acf03c49c6aa4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a922ecde2f712428565fa4b0f4544c26249f9c0a85f5801c2b4029d15650d80edca3fae70fb81356c5c66ddce681ffca544c77d3255ac02c335071d9a5b7db4b
|
7
|
+
data.tar.gz: 53756ecbb1aa2cdbad35c36f9f8b25803e7065661ab2e02716f28f44d7cab3dd9e253bcf6d1fc94dcfaa8d57a27b5f25ed8447c3e50b9d884d1d08fae72ddc75
|
data/lib/omniai/chat/chunk.rb
CHANGED
@@ -31,6 +31,11 @@ module OmniAI
|
|
31
31
|
@data['model']
|
32
32
|
end
|
33
33
|
|
34
|
+
# @return [Array<OmniAI::Chat::Choice>]
|
35
|
+
def choices
|
36
|
+
@choices ||= @data['choices'].map { |data| Choice.new(data:) }
|
37
|
+
end
|
38
|
+
|
34
39
|
# @param [index] [Integer]
|
35
40
|
# @return [OmniAI::Chat::Delta]
|
36
41
|
def choice(index: 0)
|
@@ -38,7 +38,7 @@ module OmniAI
|
|
38
38
|
|
39
39
|
# @return [Array<OmniAI::Chat::Choice>]
|
40
40
|
def choices
|
41
|
-
@choices ||= @data['choices'].map { |
|
41
|
+
@choices ||= @data['choices'].map { |data| Choice.new(data:) }
|
42
42
|
end
|
43
43
|
|
44
44
|
# @param [index] [Integer] optional - default is 0
|
data/lib/omniai/version.rb
CHANGED