omniai 1.5.1 → 1.5.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a989cab03afca85385b23f4684d377b8d1a09533a73899fa79eebcce4f4a3260
4
- data.tar.gz: bb39575e251b0dd6cf6e0e3b24ba86765fd550feeb3a222ce5f785ca654e8741
3
+ metadata.gz: 81c34e7c05b90e85fe99ba87f0b462f4322a0dd14c74afdb5f951faccdc698d6
4
+ data.tar.gz: 551b238e17c909abbe3b08ecf630a2f6aa0047a17413c7966d23ca9ccbf0d26d
5
5
  SHA512:
6
- metadata.gz: e20f0ee5ab32ceb95e33e38888c81e28f936294cfcd9a3dad80a8d89a9fd3241477455e706d70fb949502b01cdf968547104e55931138512b4e617dd9688fe02
7
- data.tar.gz: 58aa9a8a43b2e8a7580beac909b7ddd34fcaaa3d9c60c9105d3dba0cd18923f7361473fdb863890fbfa17013a1339b71008381e105bd961de44dec67db8eac8b
6
+ metadata.gz: 0c291e2840cd9782046d7011e7becc77b2d9c64da427d6785ed121ae430a4153f7fb3d6f28f4f4c9cb943f18a0b8d7c20e345fc8c6d0097faa83eb205a302132
7
+ data.tar.gz: d592b529340cacdcf458295a9914589806f6c568469c0c9548cdbd63fa639d64dcb04982dc2f7f68506e2207809a2b1b689b6267dabe262f3847c298785f5ba7
@@ -20,11 +20,6 @@ module OmniAI
20
20
  part.tool_call_list
21
21
  end
22
22
 
23
- # @return [Boolean]
24
- def tool_call_list?
25
- tool_call_list.any?
26
- end
27
-
28
23
  # @return [String, nil]
29
24
  def content
30
25
  part.content
@@ -66,11 +66,6 @@ module OmniAI
66
66
  def tool_call_list
67
67
  choice.tool_call_list
68
68
  end
69
-
70
- # @return [Boolean]
71
- def tool_call_list?
72
- choice.tool_call_list?
73
- end
74
69
  end
75
70
  end
76
71
  end
data/lib/omniai/chat.rb CHANGED
@@ -103,7 +103,7 @@ module OmniAI
103
103
  def complete!(response:)
104
104
  completion = self.class::Response::Completion.new(data: response.parse)
105
105
 
106
- if @tools && completion.tool_call_required?
106
+ if @tools && completion.tool_call_list.any?
107
107
  @messages = [
108
108
  *@messages,
109
109
  *completion.choices.map(&:message).map(&:data),
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OmniAI
4
- VERSION = '1.5.1'
4
+ VERSION = '1.5.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre