smart_agent 0.2.7 → 0.2.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/lib/smart_agent/agent.rb +2 -2
- data/lib/smart_agent/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 666973e72e303998abcf62405a78a124205ccdbc741c011d3a3cec05a234e7a0
|
|
4
|
+
data.tar.gz: eaf248d80cd7f5c203cfde80de6dc1ed9827539173dce3afb704e5661631cf77
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bcf37c58978695dd35a844a31ea998f30cc8035c8b51b4267b47ab9a90d29d0d4b59de0a67194632c641e2737de1bc1692452d31fa1640b89e344760cb2e62e4
|
|
7
|
+
data.tar.gz: c4f6a71d195797d30ebf34a82c02e5f637bd31e3085ac056092189199628b0c34b6d23d54be3936e4c13d02d8e879c228840e2c66b3c66f16334b6cb0b7010de
|
data/lib/smart_agent/agent.rb
CHANGED
|
@@ -153,7 +153,7 @@ module SmartAgent
|
|
|
153
153
|
if Tool.find_tool(tool_name)
|
|
154
154
|
tool_result = Tool.find_tool(tool_name).call(params, @agent)
|
|
155
155
|
if tool_result
|
|
156
|
-
@agent.processor(:tool).call({ :content => tool_result })
|
|
156
|
+
@agent.processor(:tool).call({ :content => tool_result }) if @agent.processor(:tool)
|
|
157
157
|
SmartAgent.prompt_engine.history_messages << { "role" => "assistant", "content" => "", "tool_calls" => [tool] } #result.response.dig("choices", 0, "message")
|
|
158
158
|
SmartAgent.prompt_engine.history_messages << { "role" => "tool", "tool_call_id" => tool_call_id, "content" => tool_result.to_s.force_encoding("UTF-8") }
|
|
159
159
|
results << tool_result
|
|
@@ -162,7 +162,7 @@ module SmartAgent
|
|
|
162
162
|
if server_name = MCPClient.find_server_by_tool_name(tool_name)
|
|
163
163
|
tool_result = MCPClient.new(server_name).call(tool_name, params, @agent)
|
|
164
164
|
if tool_result
|
|
165
|
-
@agent.processor(:tool).call({ :content => tool_result })
|
|
165
|
+
@agent.processor(:tool).call({ :content => tool_result }) if @agent.processor(:tool)
|
|
166
166
|
SmartAgent.prompt_engine.history_messages << { "role" => "assistant", "content" => "", "tool_calls" => [tool] } # result.response.dig("choices", 0, "message")
|
|
167
167
|
SmartAgent.prompt_engine.history_messages << { "role" => "tool", "tool_call_id" => tool_call_id, "content" => tool_result.to_s }
|
|
168
168
|
results << tool_result
|
data/lib/smart_agent/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smart_agent
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zhuang Biaowei
|
|
@@ -13,16 +13,16 @@ dependencies:
|
|
|
13
13
|
name: smart_prompt
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
15
15
|
requirements:
|
|
16
|
-
- - "
|
|
16
|
+
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.5.2
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
|
-
- - "
|
|
23
|
+
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.5.2
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: mcp-sdk.rb
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
85
85
|
- !ruby/object:Gem::Version
|
|
86
86
|
version: '0'
|
|
87
87
|
requirements: []
|
|
88
|
-
rubygems_version: 4.0.
|
|
88
|
+
rubygems_version: 4.0.13
|
|
89
89
|
specification_version: 4
|
|
90
90
|
summary: Intelligent agent framework with DSL and MCP integration
|
|
91
91
|
test_files: []
|