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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/oxaiworkers/tool/pipeline.rb +5 -3
- data/lib/oxaiworkers/tool_definition.rb +1 -1
- data/lib/oxaiworkers/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cc1b5f51a3913a73d305b2e70cccecf5a5f374b6f42e22e439f0be77964f65e
|
4
|
+
data.tar.gz: 61d72d599c805c1273d64b5a02966ddce1d26ced4d3c50229f56683156da6760
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfc51fb5e8f09aabbafdf030d8403795bf16414eb913b772b3f2a3935d87644337e89308cbbedb2802c1edd99d30e3367f86bf2f1203c25db012a362f4e6943c
|
7
|
+
data.tar.gz: 58f3ebac1dd77b856d5500220feeb3270320394543a26e7114750d01383dd8dace6242a4e6c182ec9ab707db41699e2a324a3b3e1590ba8ad70cc3f1eae3de8b
|
data/CHANGELOG.md
CHANGED
@@ -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:
|
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:,
|
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
|
-
|
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:
|
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
|
data/lib/oxaiworkers/version.rb
CHANGED