ox-ai-workers 1.0.0 → 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: '08d60458411dc13e70f540f8a9bb66a3ba81c56f7fdbd6811a490d369ee40ed5'
4
- data.tar.gz: 9ee3658277f4fae153367216c4caca4f7c95335c12b0e13a3a008cb7cae547bf
3
+ metadata.gz: 4cc1b5f51a3913a73d305b2e70cccecf5a5f374b6f42e22e439f0be77964f65e
4
+ data.tar.gz: 61d72d599c805c1273d64b5a02966ddce1d26ced4d3c50229f56683156da6760
5
5
  SHA512:
6
- metadata.gz: bc1cd562389dd943de6778a39fc3382e9f0b81fc6354869ff5ed9ade6df26278cd6d87f9cf240ccca00abba977d09865688ef59ecbe1ea3d07be1b2156cb3c9c
7
- data.tar.gz: c9ac89a000577ca59d5b1ae577faf52c0212f746e562664d3c12250c651cd4be547028fd68749b9abf9fb30d35e3dc2ded8b6164564a83df2c405f8267af237d
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,8 @@ 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
+ required: true
21
22
  property :to_id, type: 'string', description: I18n.t('oxaiworkers.tool.pipeline.send_message.to_id'),
22
23
  required: true
23
24
  end
@@ -26,7 +27,7 @@ module OxAiWorkers
26
27
  @on_message = on_message
27
28
  end
28
29
 
29
- def send_message(message:, result:, example:, to_id:)
30
+ def send_message(message:, result:, to_id:, example: nil)
30
31
  puts "send_message to #{to_id}: #{message}".colorize(:red)
31
32
  puts " Result: #{result}"
32
33
  puts " Example: #{example}"
@@ -35,7 +36,9 @@ module OxAiWorkers
35
36
  @assistants[to_id].add_task message
36
37
  with_locale do
37
38
  @assistants[to_id].add_task "#{I18n.t('oxaiworkers.tool.pipeline.send_message.result')}: #{result}"
38
- @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
39
42
  end
40
43
  @assistants[to_id].execute
41
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'
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
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Smolev