ask-agent 0.10.1 → 0.11.0

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: d5e756cf8cac1846725f37f01183d28716b4a92c312a9bc7fa75615730ae0bcc
4
- data.tar.gz: 153d95d3f55329725343f0dc0355170991dc83fa13fe45d67526ab25784c040d
3
+ metadata.gz: 14e351edbbd119bd5ae5bf8701fd38dd1370b496a415d6be9bc386cb3c5bb04b
4
+ data.tar.gz: 4a156a06a909b8725685ec7cb5bff121e46b2ebcb2976b6411cb4c29c75ab364
5
5
  SHA512:
6
- metadata.gz: 1ab7d1b8123ebd090f08afe988ae7cb300c6763c93e9f4eef6235aa78c223fa07f54afae67fa69cbf19114c8a7ceb72da2ed1cb3b069adb0bfb871b852dfbdae
7
- data.tar.gz: f42792ffb098e24ac9fd9b25495c96d53754518276ec75c339e22c7dc1565e95f5f07e6a3629d9e7554b4aa53e21e60f7f699931410aa7646af42f8be683440a
6
+ metadata.gz: 852a51b092bbe1d4e3a2b57c87001474261d413428ab83bb4a71fae4858a229e0c9a9d337c24a89177773c1b2ee82a8aac8069455f2f1191350d0d66c19a477f
7
+ data.tar.gz: ca6761470ac7c95191bf7e2bd49c47bf10a71fd0ba6796468ddc113692f5f685f6a73d57f9fe46cf7fc6295f6b3c7aa11806212b62d8c18f60562888bcd7d4c0
@@ -55,6 +55,49 @@ module Ask
55
55
  end
56
56
  end
57
57
 
58
+ # Set or get the provider override.
59
+ def provider(value = :__no_value__)
60
+ if value == :__no_value__
61
+ _config[:provider]
62
+ else
63
+ _config[:provider] = value
64
+ end
65
+ end
66
+
67
+ # Set or get max turns for the session.
68
+ def max_turns(value = :__no_value__)
69
+ if value == :__no_value__
70
+ _config[:max_turns]
71
+ else
72
+ _config[:max_turns] = value
73
+ end
74
+ end
75
+
76
+ # Set or get parallel tool execution flag.
77
+ def parallel_tools(value = :__no_value__)
78
+ if value == :__no_value__
79
+ _config.key?(:parallel_tools) ? _config[:parallel_tools] : true
80
+ else
81
+ _config[:parallel_tools] = value
82
+ end
83
+ end
84
+
85
+ # Set an arbitrary Session option. Accepts any key that
86
+ # Ask::Agent::Session.new understands.
87
+ #
88
+ # option :temperature, 0.7
89
+ # option :reflector, true
90
+ # option :telemetry, false
91
+ def option(key, value = :__no_value__)
92
+ if value == :__no_value__
93
+ _config[:options] ||= {}
94
+ _config[:options][key]
95
+ else
96
+ _config[:options] ||= {}
97
+ _config[:options][key] = value
98
+ end
99
+ end
100
+
58
101
  # Set tool symbols or classes.
59
102
  def tools(*values)
60
103
  if values.any?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ask
4
4
  module Agent
5
- VERSION = "0.10.1"
5
+ VERSION = "0.11.0"
6
6
  end
7
7
  end
data/lib/ask/agent.rb CHANGED
@@ -145,6 +145,16 @@ module Ask
145
145
  config = klass._config
146
146
  session_opts = { model: config[:model] || Ask::Agent.configuration.default_model }
147
147
 
148
+ # Pass optional config
149
+ session_opts[:provider] = config[:provider] if config[:provider]
150
+ session_opts[:max_turns] = config[:max_turns] if config[:max_turns]
151
+ session_opts[:parallel_tools] = config[:parallel_tools] if config.key?(:parallel_tools)
152
+
153
+ # Pass arbitrary session options
154
+ if config[:options]
155
+ session_opts.merge!(config[:options])
156
+ end
157
+
148
158
  # Pass agent directory for per-agent skills discovery
149
159
  session_opts[:agent_dir] = dir
150
160
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto