ox-ai-workers 0.2.4 → 0.2.5

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: 68e329b2bdf72c3b0d75acc50542f1af17bfde774f5e1ad26b4d28ae8b2eb3d4
4
- data.tar.gz: 7e233262b802841e7a3c6241864376d5d25668391a9b482f441b47617e556703
3
+ metadata.gz: 344c37f9e68f279cdbc7e84247ba973c57e7d3c635de4178c1c6ae48c503cf10
4
+ data.tar.gz: a1bd748d4d078c9f911549f9a0d02be9dd3ce2c02cdaac13b10eb048fe23881f
5
5
  SHA512:
6
- metadata.gz: ed6cb48bbf7ed1069fc29a4e3ca8e288f8c4e7af4fd08cd4ef4cf1a599de3720edb220afe52cb56db3b01f694cff197924b7d66908a7513979a64d818672b7c0
7
- data.tar.gz: bceb85175f975cd69100186012a4429f37e78e01f91962921979d7c27bf4e09dd0150dc8fa83d20711a62073ffb6ad58bf99bac756fdb6cf8c34de785bdf2c37
6
+ metadata.gz: 78703cebb3370c3ca967346e77f5816720a824ebefb9170d304add87aa7e4cbb1f54f7f2904bbf11e8bed5030730f24e6f9b40ea7ff59126968c70d43960ffd1
7
+ data.tar.gz: 7331e973af417507cc7c2232080b104a4d0e173eb7c1117513089374b648a3f759b31b8cffa2c1f0bb551178f63f169e7a81c2e4134381f50df5c3a95998bd3c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.5] - 2024-07-30
4
+
5
+ - Improved start template
6
+
3
7
  ## [0.2.4] - 2024-07-30
4
8
 
5
9
  - Complete template for initialization: `oxaiworkers init full`
data/README.md CHANGED
@@ -131,15 +131,17 @@ As a worker, you can use different classes depending on your needs:
131
131
  oxaiworkers init
132
132
  ```
133
133
 
134
- or
134
+ This will create a `.oxaiworkers-local` directory with the necessary initial settings.
135
+
136
+ Additionally, you can initialize a more comprehensive example using the command:
135
137
 
136
138
  ```sh
137
139
  oxaiworkers init full
138
140
  ```
139
141
 
140
- This will create a `.oxaiworkers-local` directory with the necessary initial settings.
142
+ After this, in the `my_assistant.rb` file, you can find an example of an assistant that uses a tool from the `tools/my_tool.rb` file. In the `start` file, you will find the algorithm for applying this assistant.
141
143
 
142
- 3. Modify the settings as needed and run:
144
+ 3. Modify the code as needed and run:
143
145
 
144
146
  ```sh
145
147
  .oxaiworkers-local/start
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OxAiWorkers
4
- VERSION = '0.2.4'
4
+ VERSION = '0.2.5'
5
5
  end
@@ -8,7 +8,7 @@ class MyAssistant
8
8
  def initialize(delayed: false, model: nil)
9
9
  @iterator = OxAiWorkers::Iterator.new(
10
10
  worker: initWorker(delayed: delayed, model: model),
11
- role: 'You are a helpful assistant',
11
+ role: 'You are a software agent inside my computer',
12
12
  tools: [MyTool.new]
13
13
  )
14
14
  end
@@ -4,11 +4,13 @@ class MyTool
4
4
  extend OxAiWorkers::ToolDefinition
5
5
  include OxAiWorkers::DependencyHelper
6
6
 
7
- define_function :printHello, description: 'Print hello' do
8
- property :name, type: 'string', description: 'Your name', required: true
7
+ define_function :sh, description: 'Execute a sh command and get the result (stdout + stderr)' do
8
+ property :input, type: 'string', description: 'Source command', required: true
9
9
  end
10
10
 
11
- def printHello(name:)
12
- puts "Hello #{name}"
11
+ def sh(input:)
12
+ puts "Executing sh: \"#{input}\""
13
+ stdout_and_stderr_s, = Open3.capture2e(input)
14
+ stdout_and_stderr_s
13
15
  end
14
16
  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: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Smolev