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 +4 -4
- data/lib/ask/agent/definition.rb +43 -0
- data/lib/ask/agent/version.rb +1 -1
- data/lib/ask/agent.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 14e351edbbd119bd5ae5bf8701fd38dd1370b496a415d6be9bc386cb3c5bb04b
|
|
4
|
+
data.tar.gz: 4a156a06a909b8725685ec7cb5bff121e46b2ebcb2976b6411cb4c29c75ab364
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 852a51b092bbe1d4e3a2b57c87001474261d413428ab83bb4a71fae4858a229e0c9a9d337c24a89177773c1b2ee82a8aac8069455f2f1191350d0d66c19a477f
|
|
7
|
+
data.tar.gz: ca6761470ac7c95191bf7e2bd49c47bf10a71fd0ba6796468ddc113692f5f685f6a73d57f9fe46cf7fc6295f6b3c7aa11806212b62d8c18f60562888bcd7d4c0
|
data/lib/ask/agent/definition.rb
CHANGED
|
@@ -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?
|
data/lib/ask/agent/version.rb
CHANGED
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
|
|