ox-ai-workers 1.0.1 → 1.0.1.2

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: 4cc1b5f51a3913a73d305b2e70cccecf5a5f374b6f42e22e439f0be77964f65e
4
- data.tar.gz: 61d72d599c805c1273d64b5a02966ddce1d26ced4d3c50229f56683156da6760
3
+ metadata.gz: a44154a5993074989fd9a8aa35d58357f8892972668aa37c190385055414e7a0
4
+ data.tar.gz: 12567347321e4dc16f4aa8b566c1ab1c9c5a3b2fe2c43f3aa4919ee666212d2f
5
5
  SHA512:
6
- metadata.gz: bfc51fb5e8f09aabbafdf030d8403795bf16414eb913b772b3f2a3935d87644337e89308cbbedb2802c1edd99d30e3367f86bf2f1203c25db012a362f4e6943c
7
- data.tar.gz: 58f3ebac1dd77b856d5500220feeb3270320394543a26e7114750d01383dd8dace6242a4e6c182ec9ab707db41699e2a324a3b3e1590ba8ad70cc3f1eae3de8b
6
+ metadata.gz: 637ec32ee205cc2b4542cc96e99cfa5a91a6353d6736985393e47159186b360abcd1fe921df77f1908e6bec0ad1a3ef7edca8c650b6891884ff876f68873acf1
7
+ data.tar.gz: 01fe8654120530586f4175e9421aa3e3d224b7c55316da1dd882a5c579405e8823fbe008439738f3034083555a0bf0be8cb5e429ca6019a18091ba903b85ee83
data/README.md CHANGED
@@ -387,7 +387,8 @@ class MyTool
387
387
 
388
388
  def initialize
389
389
  define_function :hello_world, description: "Says hello to someone" do
390
- property :name, type: "string", description: "Name to greet", required: true
390
+ property :name, type: "string", description: "Name to greet" # Default required: true
391
+ property :age, type: ["integer", "null"], description: "Age of the person" # Default required: true
391
392
  end
392
393
  end
393
394
 
@@ -19,7 +19,7 @@ module OxAiWorkers
19
19
  property :prompt, type: 'string', description: I18n.t('oxaiworkers.tool.pixels.generate_image.prompt'),
20
20
  required: true
21
21
  if worker.sizes.length > 1
22
- property :size, type: 'string', description: I18n.t('oxaiworkers.tool.pixels.generate_image.size'),
22
+ property :size, type: %w[string null], description: I18n.t('oxaiworkers.tool.pixels.generate_image.size'),
23
23
  enum: worker.sizes
24
24
  end
25
25
  if current_dir.present?
@@ -28,7 +28,7 @@ module OxAiWorkers
28
28
  required: true
29
29
  end
30
30
  if worker.qualities.length > 1
31
- property :quality, type: 'string', description: I18n.t('oxaiworkers.tool.pixels.generate_image.quality'),
31
+ property :quality, type: %w[string null], description: I18n.t('oxaiworkers.tool.pixels.generate_image.quality'),
32
32
  enum: worker.qualities
33
33
  end
34
34
  end
@@ -19,7 +19,7 @@ module OxAiWorkers
19
19
  property :prompt, type: 'string', description: I18n.t('oxaiworkers.tool.wolfram_alpha.ask.prompt'),
20
20
  required: true
21
21
  if location.nil?
22
- property :location, type: 'string', description: I18n.t('oxaiworkers.tool.wolfram_alpha.ask.location'),
22
+ property :location, type: %w[string null], description: I18n.t('oxaiworkers.tool.wolfram_alpha.ask.location'),
23
23
  required: true
24
24
  end
25
25
  end
@@ -168,7 +168,7 @@ module OxAiWorkers
168
168
 
169
169
  # Builds parameter schemas for functions
170
170
  class ParameterBuilder
171
- VALID_TYPES = %w[object array string number integer boolean].freeze
171
+ VALID_TYPES = %w[object array string number integer boolean null].freeze
172
172
 
173
173
  def initialize(parent_type:, strict: true)
174
174
  @schema = parent_type == 'object' ? { type: 'object', properties: {}, required: [] } : {}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OxAiWorkers
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.1.2'
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.1
4
+ version: 1.0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Smolev