ox-ai-workers 1.1.2.11 → 1.1.2.12

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: 63d9ca70771dbbec0b74012de87f34ffe91ab276c7de091cb3549faf6e392cf8
4
- data.tar.gz: 2398e642b2f629bb27e58c3bf30ac3413c0bf71c975846bea9fa79b227b2c875
3
+ metadata.gz: 704080bc78407750192bb2249b5ef0f5cbeedca9507ddb3baea55be6651e749d
4
+ data.tar.gz: 263201940715ffa90b444f578aac5b2506d9a112d848de26e3ebbd312e75add1
5
5
  SHA512:
6
- metadata.gz: 9cd61338687ef76e06ac571c301f5cdd526d9fbc4f44076a824e3b36a9dd329a121a6ca801db8e4a35c1394af5aa7dcce3efc7977c5149f725408962a882e696
7
- data.tar.gz: 63f512d56319f96a5a4e86b300ca5cfcc76ed0b4c6ae0f6267a3053ba95bb9aa6be580dac3ab2927fec257354435e2329e73ba9ba57b3bbccaed038d1e75db8e
6
+ metadata.gz: eeaceeba70ed5ce6c628116fc739b100cbb5cead8702f92fb1e55cfa750a012f9b1dd9558870741fbe03f5a66a17388a06e47921609e4ccd0ed6d076c83e1382
7
+ data.tar.gz: 2a819f6f7ea6b780796a9b37fc9c19f75cdb49da3797f36972c3d5bca4db118c5b84e11e2bea3befa2d9178d1b5a43cb12ff5bb2074e37c53205f3b68d80f1ff
@@ -91,7 +91,7 @@ module OxAiWorkers
91
91
  else
92
92
  OxAiWorkers.logger.warn "Iterator::inner_monologue is not available: #{speach}"
93
93
  end
94
- nil
94
+ speach
95
95
  end
96
96
 
97
97
  def outer_voice(text:)
@@ -103,7 +103,7 @@ module OxAiWorkers
103
103
  inner_monologue(speach: text)
104
104
  end
105
105
 
106
- nil
106
+ text
107
107
  end
108
108
 
109
109
  def finish_it
@@ -171,6 +171,7 @@ module OxAiWorkers
171
171
 
172
172
  def next_iteration
173
173
  @messages += @queue
174
+ OxAiWorkers.logger.warn "Iterator::Next iteration: #{@messages.count}/#{@queue.count}"
174
175
  @queue = []
175
176
  @worker.append(messages: @messages)
176
177
  request!
@@ -245,8 +246,10 @@ module OxAiWorkers
245
246
  iterate! if can_iterate?
246
247
  end
247
248
  result = @worker.result || @worker.errors
248
- OxAiWorkers.logger.warn "Iterator::No tool calls: #{result}"
249
- outer_voice text: result if result.present?
249
+ if result.present?
250
+ OxAiWorkers.logger.warn "Iterator::No tool calls: #{result}"
251
+ outer_voice text: result
252
+ end
250
253
  end
251
254
 
252
255
  def complete_iteration
@@ -63,7 +63,7 @@ module OxAiWorkers
63
63
  {
64
64
  type: 'tool_result',
65
65
  tool_use_id: "call_#{call_id}",
66
- content: out.present? ? out : "Tool call #{name} successful."
66
+ content: out.present? ? out : "Successful"
67
67
  }
68
68
  ]
69
69
  }
@@ -41,12 +41,14 @@ module OxAiWorkers
41
41
  @messages.each do |message|
42
42
  content = message[:content]
43
43
  if content.is_a?(String)
44
- OxAiWorkers.logger.info "Request (String): #{content.truncate(500)}"
44
+ OxAiWorkers.logger.warn "Request (String)[#{message[:role]}]: #{content.truncate(500)}"
45
45
  elsif content.is_a?(Array)
46
- types = content.map { |item| "#{item[:type]}: #{item[:content]&.truncate(500)}" }.compact.join(', ')
47
- OxAiWorkers.logger.info "Request (Array): [#{types}]"
46
+ types = content.map do |item|
47
+ "#{item[:type]}: #{item[:content]&.truncate(500)} #{item[:input]&.truncate(500)}"
48
+ end.compact.join(', ')
49
+ OxAiWorkers.logger.warn "Request (Array): [#{types}]"
48
50
  else
49
- OxAiWorkers.logger.info "Request (Other): #{message.inspect}"
51
+ OxAiWorkers.logger.warn "Request (Other): #{message.inspect}"
50
52
  end
51
53
  end
52
54
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OxAiWorkers
4
- VERSION = '1.1.2.11'
4
+ VERSION = '1.1.2.12'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ox-ai-workers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2.11
4
+ version: 1.1.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Smolev