soka 0.0.6 → 0.0.8
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 +13 -0
- data/lib/soka/agents/hook_manager.rb +2 -1
- data/lib/soka/engines/prompts/base.rb +1 -1
- data/lib/soka/engines/prompts/instructions.rb +1 -1
- data/lib/soka/engines/prompts/workflow_rules.rb +1 -1
- data/lib/soka/engines/react.rb +8 -2
- data/lib/soka/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 222783fa72ada5e52bb3ad666afb50ec9bf47184cf87e7268cc85f1bcdf38aad
|
4
|
+
data.tar.gz: d0f95b6933141e1e992f13321733956430e8619648ccda945246e3ac6b86b234
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b505b2e25f6ac3216d750ef5c0e411c8141c6c5d6dfc5deecae75f799c42fd21b831a873e0602c3e4f8398aacf4e4757947e61a11925b2a22967b98930c3068
|
7
|
+
data.tar.gz: 0f62b55320302343f1ba30dabbef068f31d66545b100f691533e96ed9c2d4eb3d4c6851a81e43d5248b83e2d81398f9b49fa24ceb4e19f494d948ae8c75e89db
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.0.8] - 2025-08-15
|
11
|
+
|
12
|
+
### Tests
|
13
|
+
- test: update specs to match reduced thought word limit (73564ae)
|
14
|
+
|
15
|
+
## [0.0.7] - 2025-08-15
|
16
|
+
|
17
|
+
### Features
|
18
|
+
- feat: add execution time tracking to ReAct engine (eea5efb)
|
19
|
+
|
20
|
+
### Code Refactoring
|
21
|
+
- refactor: reduce thought tag word limit for better conciseness (7b3290c)
|
22
|
+
|
10
23
|
## [0.0.6] - 2025-08-12
|
11
24
|
|
12
25
|
### Features
|
@@ -54,7 +54,7 @@ module Soka
|
|
54
54
|
<<~STRUCTURE
|
55
55
|
🔧 REACT FRAMEWORK STRUCTURE:
|
56
56
|
You MUST use XML-style tags to structure your response. Each tag has a specific purpose:
|
57
|
-
- <Thought>: Your first-person reasoning (max
|
57
|
+
- <Thought>: Your first-person reasoning (max 20 words)
|
58
58
|
- <Action>: Tool invocation with JSON parameters
|
59
59
|
- <Observation>: Tool results (provided by system)
|
60
60
|
- <FinalAnswer>: Your complete solution (direct & concise)
|
@@ -41,7 +41,7 @@ module Soka
|
|
41
41
|
|
42
42
|
1️⃣ THINKING PHASE (Required):
|
43
43
|
<Thought>
|
44
|
-
MAXIMUM
|
44
|
+
MAXIMUM 20 WORDS - Be extremely concise!
|
45
45
|
Use first-person perspective (I, me, my).
|
46
46
|
NEVER mention: "LLM", "AI", "formatting for", "organizing for someone".
|
47
47
|
NEVER say: "I will act as", "I will play the role of", "as an expert".
|
@@ -56,7 +56,7 @@ module Soka
|
|
56
56
|
|
57
57
|
2. 💭 THINKING PHASE:
|
58
58
|
- Always start with <Thought>...</Thought>
|
59
|
-
- MAXIMUM
|
59
|
+
- MAXIMUM 20 WORDS per thought
|
60
60
|
- Use first-person perspective (I, me, my)
|
61
61
|
- AVOID: "LLM", "AI", "formatting for", "organizing for"
|
62
62
|
- AVOID: "act as", "play role of", "as an expert", "I will be"
|
data/lib/soka/engines/react.rb
CHANGED
@@ -9,7 +9,7 @@ module Soka
|
|
9
9
|
include Concerns::ResponseParser
|
10
10
|
include Concerns::ResultBuilder
|
11
11
|
|
12
|
-
ReasonResult = Struct.new(:input, :thoughts, :final_answer, :status, :error,
|
12
|
+
ReasonResult = Struct.new(:input, :thoughts, :final_answer, :status, :error, :execution_time,
|
13
13
|
keyword_init: true) do
|
14
14
|
def successful?
|
15
15
|
status == :success
|
@@ -21,12 +21,18 @@ module Soka
|
|
21
21
|
# @yield [event] Optional block to handle events during execution
|
22
22
|
# @return [ReasonResult] The result of the reasoning process
|
23
23
|
def reason(task, &block)
|
24
|
+
start_time = Time.now
|
24
25
|
context = ReasoningContext.new(task: task, event_handler: block, max_iterations: max_iterations,
|
25
26
|
think_in: think_in)
|
26
27
|
context.messages = build_messages(task)
|
27
28
|
|
28
29
|
result = iterate_reasoning(context)
|
29
|
-
result
|
30
|
+
result ||= max_iterations_result(context)
|
31
|
+
|
32
|
+
# Add execution time to the result
|
33
|
+
execution_time = Time.now - start_time
|
34
|
+
result.execution_time = execution_time if result.respond_to?(:execution_time=)
|
35
|
+
result
|
30
36
|
end
|
31
37
|
|
32
38
|
# Iterate through reasoning cycles
|
data/lib/soka/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jiunjiun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|