ox-ai-workers 1.1.2 → 1.1.2.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: e8d8c85e46eadd5bc18ed5a92e38788bf9a2a6a5d05ece613dc57002a5f981f5
4
- data.tar.gz: 3d18bf14bb4cbbab5524d2f03fd7cd27c58893abfc7d3b7651651e3d27a5bbd1
3
+ metadata.gz: 7345d2dabee419e590b804e61614d7849d86112361077ad7353ddbb3a8a22436
4
+ data.tar.gz: c71492424ffe59a875d3d4131e808c7b3657c04c51436b60d99c946af9948412
5
5
  SHA512:
6
- metadata.gz: 55b022fc7ef39b457d34add213e82fa1c2afa0404cfc388ea924e59f6805fa4214f36495ae4dbceb48b6e2338af7861f53a4e6c78009120fce3218ac43877241
7
- data.tar.gz: d34e7038eb8472a36481e18e57318e4b5f930bc9e13a15516764b2c20d969bfa8f2ee0c47bdcb921c30545c75df5b4c2e5ad2e93e0817cfa2af5a3810bd722d7
6
+ metadata.gz: 83a19cb82666fd09c2afae40c0d0ce3fe6dd422f64e6139a7e1482d7131149394bb95ce1473cd76faa8859dd04336f004e75220f02629ca7400194a9f0fdea59
7
+ data.tar.gz: 9c70bd792d3091e2bbe896ca54c1958ea222028584c509ead8b3984f5ecafea1cb6f23b7329744eea57b1203508cb376e25f4615d4a54abfbadd9782bad3ea83
data/README.md CHANGED
@@ -90,7 +90,6 @@ OxAiWorkers.configure do |config|
90
90
  config.access_token_deepseek = ENV.fetch("DEEPSEEK")
91
91
  config.access_token_stability = ENV.fetch("STABILITY")
92
92
  config.max_tokens = 4096 # Default
93
- config.temperature = 0.7 # Default
94
93
  config.wait_for_complete = true # Default
95
94
  end
96
95
 
data/lib/ox-ai-workers.rb CHANGED
@@ -55,18 +55,16 @@ require_relative 'oxaiworkers/engine' if defined?(Rails)
55
55
 
56
56
  module OxAiWorkers
57
57
  DEFAULT_MAX_TOKEN = 4096
58
- DEFAULT_TEMPERATURE = 0.7
59
58
 
60
59
  class Error < StandardError; end
61
60
  class ConfigurationError < Error; end
62
61
 
63
62
  class Configuration
64
- attr_accessor :max_tokens, :temperature, :wait_for_complete, :access_token_deepseek, :access_token_openai,
63
+ attr_accessor :max_tokens, :wait_for_complete, :access_token_deepseek, :access_token_openai,
65
64
  :access_token_stability, :access_token_wolfram, :access_token_anthropic, :access_token_gemini
66
65
 
67
66
  def initialize
68
67
  @max_tokens = DEFAULT_MAX_TOKEN
69
- @temperature = DEFAULT_TEMPERATURE
70
68
  @wait_for_complete = true
71
69
 
72
70
  @access_token_deepseek = nil
@@ -6,6 +6,7 @@ module OxAiWorkers
6
6
  def initialize(uri_base: nil, api_key: nil, model: nil, max_tokens: nil, temperature: nil, frequency_penalty: nil)
7
7
  @model = model || 'claude-3-7-sonnet-latest'
8
8
  @uri_base = uri_base # || 'https://api.anthropic.com/v1/'
9
+ @temperature = temperature || 0.1
9
10
  @api_key = api_key || OxAiWorkers.configuration.access_token_anthropic
10
11
  super(uri_base: @uri_base, api_key: @api_key, model: @model, max_tokens:, temperature:, frequency_penalty:)
11
12
  end
@@ -5,6 +5,7 @@ module OxAiWorkers
5
5
  class DeepseekMax < LLMBase
6
6
  def initialize(uri_base: nil, api_key: nil, model: nil, max_tokens: nil, temperature: nil, frequency_penalty: nil)
7
7
  @model = model || 'deepseek-chat'
8
+ @temperature = temperature || 0.1
8
9
  @uri_base = uri_base || 'https://api.deepseek.com/'
9
10
  @api_key = api_key || OxAiWorkers.configuration.access_token_deepseek
10
11
  super(uri_base: @uri_base, api_key: @api_key, model: @model, max_tokens:, temperature:, frequency_penalty:)
@@ -7,7 +7,7 @@ module OxAiWorkers
7
7
 
8
8
  def initialize(uri_base:, api_key:, model:, max_tokens: nil, temperature: nil, frequency_penalty: nil)
9
9
  @max_tokens = max_tokens || OxAiWorkers.configuration.max_tokens
10
- @temperature = temperature || OxAiWorkers.configuration.temperature
10
+ @temperature = temperature
11
11
  @frequency_penalty = frequency_penalty || 0
12
12
  @api_key = api_key
13
13
  @uri_base = uri_base
@@ -5,6 +5,7 @@ module OxAiWorkers
5
5
  class OpenaiMax < LLMBase
6
6
  def initialize(uri_base: nil, api_key: nil, model: nil, max_tokens: nil, temperature: nil, frequency_penalty: nil)
7
7
  @model = model || 'gpt-4.1'
8
+ @temperature = temperature || 0.1
8
9
  @api_key = api_key || OxAiWorkers.configuration.access_token_openai
9
10
  super(uri_base:, api_key: @api_key, model: @model, max_tokens:, temperature:, frequency_penalty:)
10
11
  end
@@ -5,6 +5,7 @@ module OxAiWorkers
5
5
  class OpenaiMini < OpenaiMax
6
6
  def initialize(uri_base: nil, api_key: nil, model: nil, max_tokens: nil, temperature: nil, frequency_penalty: nil)
7
7
  @model = model || 'gpt-4.1-mini'
8
+ @temperature = temperature || 0.1
8
9
  super(uri_base:, api_key:, model: @model, max_tokens:, temperature:, frequency_penalty:)
9
10
  end
10
11
  end
@@ -5,6 +5,7 @@ module OxAiWorkers
5
5
  class OpenaiNano < OpenaiMax
6
6
  def initialize(uri_base: nil, api_key: nil, model: nil, max_tokens: nil, temperature: nil, frequency_penalty: nil)
7
7
  @model = model || 'gpt-4.1-nano'
8
+ @temperature = temperature || 0.1
8
9
  super(uri_base:, api_key:, model: @model, max_tokens:, temperature:, frequency_penalty:)
9
10
  end
10
11
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OxAiWorkers
4
- VERSION = '1.1.2'
4
+ VERSION = '1.1.2.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.1.2
4
+ version: 1.1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Smolev