soka-rails 0.0.2 → 0.0.3

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: 956c0fc8a0ecef6e81f471a6674f4a0c7c5df800f720618ecf54a32c87583d1f
4
- data.tar.gz: d7d16aff15e796d33c284bb77f1db2f7ff42ba61dbf3fb7f76ded2e87a0758d5
3
+ metadata.gz: 8e5ecc6bd862b68971cd0b63fe3535e24b110844dbb93d69a6088af129b1806e
4
+ data.tar.gz: e7d13cca5d699e68f1224a6f3981b372abc1ac3072845aec7f10a47f31702517
5
5
  SHA512:
6
- metadata.gz: fd259ec01dcb6ba6c760685a3d1f94bf0091a9298014f696c782cf7839e182651d1e9c44457ed9505bc76a6b048ab72a9bc9b16063c43b436a5b7d48ce98ad17
7
- data.tar.gz: 3383aba5cdbf64703815efe55214ad63e9ae8d8aedcd6f845c97ef4c6382cf91ba8a9cd0217c75a4fa7db38fa62507072a3550d64c8098dadfa85fd97e0585d9
6
+ metadata.gz: 8fccb922b42ad0ecebb6aa56e85aa2adca7235b0bf8f8f706abbf426e777202674329662d6982ada09fa15ed5c4962ee354e33f0ffaed26c24063305b09f1109
7
+ data.tar.gz: 7a626cb54ba4272cb95cdaa895098fc99f3c14f3873a26f3ae5c8c41e705b9ffb56c22ac24f34874715b8f84920a023864ce54f8c02471e5dd0b8cdd892b7f80
data/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.0.3] - 2025-08-04
9
+
10
+ ### Added
11
+ - Upgrade to Soka v0.0.3 with custom instructions and multilingual support
12
+
8
13
  ## [0.0.2] - 2025-08-01
9
14
 
10
15
  ### Fixed
data/DESIGN.md CHANGED
@@ -478,7 +478,6 @@ module Soka
478
478
  def mock_ai_response(response_attrs = {})
479
479
  default_response = {
480
480
  final_answer: "Mocked answer",
481
- confidence_score: 0.95,
482
481
  status: :completed,
483
482
  iterations: 1,
484
483
  thought_process: []
@@ -616,7 +615,6 @@ class ConversationsController < ApplicationController
616
615
  def build_response(result)
617
616
  {
618
617
  answer: result.final_answer,
619
- confidence: result.confidence_score,
620
618
  status: result.status,
621
619
  metadata: {
622
620
  iterations: result.iterations,
@@ -652,7 +650,6 @@ class ProcessConversationJob < ApplicationJob
652
650
  user.conversations.create!(
653
651
  message: message,
654
652
  response: result.final_answer,
655
- confidence: result.confidence_score,
656
653
  metadata: {
657
654
  iterations: result.iterations,
658
655
  thought_process: result.thought_process
data/README.md CHANGED
@@ -26,6 +26,8 @@ Soka Rails is a Rails integration package for the Soka AI Agent Framework, provi
26
26
  - 🔄 **Rails Lifecycle Hooks**: Integrates with Rails logging and error tracking
27
27
  - 💾 **Session Memory Support**: Store conversation history in Rails sessions
28
28
  - 🔐 **Authentication Integration**: Works with Rails authentication systems
29
+ - 🗣️ **Custom Instructions**: Customize agent personality and behavior (Soka v0.0.3+)
30
+ - 🌐 **Multilingual Thinking**: Support for reasoning in different languages (Soka v0.0.3+)
29
31
 
30
32
  ## Installation
31
33
 
@@ -91,7 +93,7 @@ class ConversationsController < ApplicationController
91
93
 
92
94
  render json: {
93
95
  answer: result.final_answer,
94
- confidence: result.confidence_score
96
+ status: result.status
95
97
  }
96
98
  end
97
99
  end
@@ -243,6 +245,12 @@ class WeatherAgent < ApplicationAgent
243
245
  tool TemperatureTool
244
246
  tool HumidityTool
245
247
 
248
+ # Custom instructions
249
+ # instructions "You are a weather expert. Always provide temperature in both Celsius and Fahrenheit."
250
+
251
+ # Multilingual thinking
252
+ # think_in 'en' # Supported: 'en', 'zh-TW', 'ja-JP', etc.
253
+
246
254
  # Configuration
247
255
  # max_iterations 10
248
256
  # timeout 30
data/SPEC.md CHANGED
@@ -291,7 +291,6 @@ class ConversationsController < ApplicationController
291
291
 
292
292
  render json: {
293
293
  answer: result.final_answer,
294
- confidence: result.confidence_score,
295
294
  status: result.status
296
295
  }
297
296
  end
@@ -10,6 +10,12 @@ class <%= @agent_class_name %> < ApplicationAgent
10
10
  # tool YourTool
11
11
  <% end -%>
12
12
 
13
+ # Custom instructions (new in v0.0.3)
14
+ # instructions "You are a helpful assistant specialized in..."
15
+
16
+ # Multilingual thinking (new in v0.0.3)
17
+ # think_in 'en' # 'en', 'zh-TW', 'ja-JP', etc.
18
+
13
19
  # Configuration
14
20
  # max_iterations 10
15
21
  # timeout 30
@@ -15,14 +15,14 @@ RSpec.describe <%= @tool_class_name %>Tool, type: :tool do
15
15
  }
16
16
  end
17
17
 
18
- it 'executes successfully with valid params' do
18
+ it 'calls successfully with valid params' do
19
19
  result = tool.call(**params)
20
20
 
21
21
  expect(result).to be_a(Hash)
22
22
  expect(result[:result]).to be_present
23
23
  end
24
24
  <% else -%>
25
- it 'executes successfully' do
25
+ it 'calls successfully' do
26
26
  result = tool.call
27
27
 
28
28
  expect(result).to be_a(Hash)
@@ -19,7 +19,6 @@ module Soka
19
19
  def build_mock_response(attrs)
20
20
  default_response = {
21
21
  final_answer: 'Mocked answer',
22
- confidence_score: 0.95,
23
22
  status: :completed,
24
23
  iterations: 1,
25
24
  thought_process: []
@@ -95,7 +94,6 @@ module Soka
95
94
  default_attrs = {
96
95
  status: :completed,
97
96
  final_answer: 'Success',
98
- confidence_score: 0.95,
99
97
  iterations: 1
100
98
  }
101
99
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Soka
4
4
  module Rails
5
- VERSION = '0.0.2'
5
+ VERSION = '0.0.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soka-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - jiunjiun
@@ -35,14 +35,14 @@ dependencies:
35
35
  requirements:
36
36
  - - "~>"
37
37
  - !ruby/object:Gem::Version
38
- version: 0.0.1
38
+ version: 0.0.3
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - "~>"
44
44
  - !ruby/object:Gem::Version
45
- version: 0.0.1
45
+ version: 0.0.3
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: zeitwerk
48
48
  requirement: !ruby/object:Gem::Requirement