ox-ai-workers 1.1.2.6 → 1.1.2.8

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: 5431053104672edc19046371ec5db5bff97e51708223addc10fa0a2a220be1f8
4
- data.tar.gz: 6de29741796285fe9862ccda4cd81a39b719eca9654ae13ef08622c8193a3e53
3
+ metadata.gz: 16b98b2ee1b52f0d7ebf2054ad36b005b1aebe2b97af73830590f532691c49f2
4
+ data.tar.gz: 2fd1dc3761f725553548559120f873bfcd44ab8c7a60fec4a5155fe0e943f9b1
5
5
  SHA512:
6
- metadata.gz: 9e5c7dc4b6f44103d550d80a5ca8b99230edcc726da9dbf9126d3905f8770eea01e28295bdd696da3c48278457536c3beffb1d5a12f3f3cd5d345150a82ad4e7
7
- data.tar.gz: 1395575735bee7599a75b360c12a973dac570e5e558e3f1d4b223de132419f3017b4342f7b3afaef5c1a514a71069f3dee459d18cb38f23bf0c74dc805f00bac
6
+ metadata.gz: 908b82e92d9c828f8dc968f802c94612ff6b5934e8746ce44f1800451127d25a72304eec3b4461bbd5f4c1183fa1865582da35c816205ec2d5a5ea119e9216b6
7
+ data.tar.gz: 7c70255b718e905a172171802f99d1a5791deaaa57e899a92a616d145661c6022f37be836aac6e0cda5486e9c77d1ddc1afbf5f56d5862b4fcc952a6fb4e0b1a
@@ -46,7 +46,7 @@ module OxAiWorkers
46
46
  types = content.map { |item| "#{item[:type]}: #{item[:content]&.truncate(50)}" }.compact.join(', ')
47
47
  OxAiWorkers.logger.info "Request (Array): [#{content.inspect}]"
48
48
  else
49
- OxAiWorkers.logger.info "Request (Other): #{content.inspect.truncate(50)}"
49
+ OxAiWorkers.logger.info "Request (Other): #{message.inspect}"
50
50
  end
51
51
  end
52
52
 
@@ -31,16 +31,20 @@ module OxAiWorkers
31
31
  puts "send_message to #{to_id}: #{message}".colorize(:red)
32
32
  puts " Result: #{result}"
33
33
  puts " Example: #{example}"
34
- context = context_for(to_id)
35
- @assistants[to_id].replace_context(context)
36
- @assistants[to_id].add_task message
37
- with_locale do
38
- @assistants[to_id].add_task "#{I18n.t('oxaiworkers.tool.pipeline.send_message.result')}: #{result}"
39
- unless example.nil?
40
- @assistants[to_id].add_task "#{I18n.t('oxaiworkers.tool.pipeline.send_message.example')}: #{example}"
34
+ if @assistants.key?(to_id)
35
+ context = context_for(to_id)
36
+ @assistants[to_id].replace_context(context)
37
+ @assistants[to_id].add_task message
38
+ with_locale do
39
+ @assistants[to_id].add_task "#{I18n.t('oxaiworkers.tool.pipeline.send_message.result')}: #{result}"
40
+ unless example.nil?
41
+ @assistants[to_id].add_task "#{I18n.t('oxaiworkers.tool.pipeline.send_message.example')}: #{example}"
42
+ end
41
43
  end
44
+ @assistants[to_id].execute
45
+ else
46
+ OxAiWorkers.logger.error "Assistant #{to_id} not found"
42
47
  end
43
- @assistants[to_id].execute
44
48
  nil
45
49
  end
46
50
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OxAiWorkers
4
- VERSION = '1.1.2.6'
4
+ VERSION = '1.1.2.8'
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.6
4
+ version: 1.1.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Smolev