ox-ai-workers 1.0.0.1 → 1.0.1

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: 5bfd6987a99ebbceea76d221f6f2f1050cd17f782213286a2fab23d6bd6e178a
4
- data.tar.gz: 65cbf912d37bb96b8c9887137aa84a33c96b9cc5215c711e727054f96a7813da
3
+ metadata.gz: 4cc1b5f51a3913a73d305b2e70cccecf5a5f374b6f42e22e439f0be77964f65e
4
+ data.tar.gz: 61d72d599c805c1273d64b5a02966ddce1d26ced4d3c50229f56683156da6760
5
5
  SHA512:
6
- metadata.gz: 0f896f86019744c1024bb3336356284861c9c59840628337ef7c5e91d7dbb5829b2e83bdcfd34d620ee32e7aab682c864d618caefb0783e1fd43a712ee95ea6f
7
- data.tar.gz: 505544fffa56299e2f5d7c00ffdd799277808af903052e5831b87d52f99c797ad777f6fe13bcaba4434eb5abc24ae5553c90dcb8199d19aa4e42cff3c21a3b1d
6
+ metadata.gz: bfc51fb5e8f09aabbafdf030d8403795bf16414eb913b772b3f2a3935d87644337e89308cbbedb2802c1edd99d30e3367f86bf2f1203c25db012a362f4e6943c
7
+ data.tar.gz: 58f3ebac1dd77b856d5500220feeb3270320394543a26e7114750d01383dd8dace6242a4e6c182ec9ab707db41699e2a324a3b3e1590ba8ad70cc3f1eae3de8b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [1.0.1] - 2025-05-13
2
+
3
+ - Property `required` parameter is now `true` by default in `define_function`
4
+
1
5
  ## [1.0.0] - 2025-05-12
2
6
 
3
7
  - Final version for 1.0.0 release
@@ -17,7 +17,7 @@ module OxAiWorkers
17
17
  required: true
18
18
  property :result, type: 'string', description: I18n.t('oxaiworkers.tool.pipeline.send_message.result'),
19
19
  required: true
20
- property :example, type: 'string', description: I18n.t('oxaiworkers.tool.pipeline.send_message.example'),
20
+ property :example, type: %w[string null], description: I18n.t('oxaiworkers.tool.pipeline.send_message.example'),
21
21
  required: true
22
22
  property :to_id, type: 'string', description: I18n.t('oxaiworkers.tool.pipeline.send_message.to_id'),
23
23
  required: true
@@ -27,7 +27,7 @@ module OxAiWorkers
27
27
  @on_message = on_message
28
28
  end
29
29
 
30
- def send_message(message:, result:, example:, to_id:)
30
+ def send_message(message:, result:, to_id:, example: nil)
31
31
  puts "send_message to #{to_id}: #{message}".colorize(:red)
32
32
  puts " Result: #{result}"
33
33
  puts " Example: #{example}"
@@ -36,7 +36,9 @@ module OxAiWorkers
36
36
  @assistants[to_id].add_task message
37
37
  with_locale do
38
38
  @assistants[to_id].add_task "#{I18n.t('oxaiworkers.tool.pipeline.send_message.result')}: #{result}"
39
- @assistants[to_id].add_task "#{I18n.t('oxaiworkers.tool.pipeline.send_message.example')}: #{example}"
39
+ unless example.nil?
40
+ @assistants[to_id].add_task "#{I18n.t('oxaiworkers.tool.pipeline.send_message.example')}: #{example}"
41
+ end
40
42
  end
41
43
  @assistants[to_id].execute
42
44
  nil
@@ -194,7 +194,7 @@ module OxAiWorkers
194
194
  # @param required [Boolean] Whether the property is required
195
195
  # @yield [Block] Block for nested properties (only for object and array types)
196
196
  # @raise [ArgumentError] If any parameter is invalid
197
- def property(name = nil, type:, description: nil, enum: nil, required: false, &)
197
+ def property(name = nil, type:, description: nil, enum: nil, required: true, &)
198
198
  validate_parameters(name:, type:, enum:, required:)
199
199
 
200
200
  prop = { type:, description:, enum: }.compact
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OxAiWorkers
4
- VERSION = '1.0.0.1'
4
+ VERSION = '1.0.1'
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.0.0.1
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Smolev