ox-ai-workers 0.7.6 → 0.7.7

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: 75f35c5b76e9af97593e992782ec4da97eaee992687496d560cb4db61a693522
4
- data.tar.gz: 42edca6ae35186ce55c0ba23dfe74c8780124d721a9fdeceb376aeef04e3e245
3
+ metadata.gz: bdf58d7a27a42a83b6e694d25ea746fd60ae55d998d2efd9d049dd4b29c4bc98
4
+ data.tar.gz: a6fef1e9c57d1adc0497b15d913e99bc157aa2af34ab4d147f805f9a6b9aa982
5
5
  SHA512:
6
- metadata.gz: 504d95f2f9a21d831e8c3f0ce8ce3478a361fc7a1dbf297f783f771c0ea2c03760d165a762dacfb9c214cf9b3717908023079bf7e2ec17669b208deed44c03f2
7
- data.tar.gz: afa73e529d35eb8778cf81b53d72ec1a4259cddfba03662cfad16577f5cf74fe58c64fe20692425ff7f5118e5bd681896289fb71084234efe3b91c4473efba95
6
+ metadata.gz: 246d70800e6acd674c0b589582bde5348365f8cee1cd98829bcf05aec06020921ca944a7650a1c0c0738cf297bda6da55e31907a7af7327dd139a13c5cc13609
7
+ data.tar.gz: 65d19033506f0f84e099b8523ca99727db289ae1ffb0de984e1fe1dd099d2c8381121ef9d38f64744c47ba21463d6d1da55d3aa79f30b93f55801d7694b8547e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.7.7] - 2025-03-22
2
+
3
+ - Added support for alternative model providers
4
+
1
5
  ## [0.7.6] - 2025-03-12
2
6
 
3
7
  - Update Task model enum syntax to Rails 7 style
data/README.md CHANGED
@@ -179,6 +179,26 @@ As a worker, you can use different classes depending on your needs:
179
179
 
180
180
  - `OxAiWorkers::DelayedRequest`: This class is used for batch API requests, ideal for operations that do not require immediate execution. Using `DelayedRequest` can save up to 50% on costs as requests are executed when the remote server is less busy, but no later than within 24 hours.
181
181
 
182
+ ### Alternative Models
183
+
184
+ OxAiWorkers supports alternative compatible models like DeepSeek. To use these models, specify the appropriate base URI in the initializer:
185
+
186
+ ```ruby
187
+ worker = OxAiWorkers::Request.new(
188
+ model: "deepseek-chat",
189
+ uri_base: "https://api.deepseek.com/"
190
+ )
191
+
192
+ # Or with configuration
193
+ OxAiWorkers.configure do |config|
194
+ config.uri_base = "https://api.deepseek.com/"
195
+ config.model = "deepseek-chat"
196
+ # Other configuration options...
197
+ end
198
+ ```
199
+
200
+ This allows you to use any API-compatible LLM provider by simply changing the base URI.
201
+
182
202
  ### Rails Projects with DelayedRequest
183
203
 
184
204
  Generate your model to store the `batch_id` in the database:
@@ -26,6 +26,7 @@ module OxAiWorkers
26
26
  def cleanup
27
27
  @client ||= OpenAI::Client.new(
28
28
  access_token: OxAiWorkers.configuration.access_token,
29
+ uri_base: OxAiWorkers.configuration.uri_base,
29
30
  log_errors: true # Highly recommended in development, so you can see what errors OpenAI is returning. Not recommended in production because it could leak private data to your logs.
30
31
  )
31
32
  @result = nil
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OxAiWorkers
4
- VERSION = '0.7.6'
4
+ VERSION = '0.7.7'
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ox-ai-workers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Smolev
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-03-12 00:00:00.000000000 Z
10
+ date: 2025-03-22 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: colorize
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  requirements: []
191
- rubygems_version: 3.6.5
191
+ rubygems_version: 3.6.6
192
192
  specification_version: 4
193
193
  summary: A powerful state machine with OpenAI generative intelligence integration
194
194
  test_files: []