activeagent 0.4.2 → 0.4.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf7ac1240fa119582c4b5891b96fb38c99bb519b925c5f79e22e8a8193aba6ba
|
4
|
+
data.tar.gz: 843c5e2e9e7344cca72f695b21569024ab50b83716a3929959e0fa124441261d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a721e85af2201e488adde2cfb686702dcffd494b1c748e8dc1444b5b540d7e58d9dc16cf9f6aea0603d77132a9da72d1c002e5809dd0ad87fcaefd84515bd6a
|
7
|
+
data.tar.gz: f47df425e66e53237cfe26498160b2c030f3baaccd15615616f857be9013b0795a9c9d2bcb3427068deef90d517df2dd26481aea8f270ede07b388f6482856f5
|
@@ -239,9 +239,7 @@ module ActiveAgent
|
|
239
239
|
def initialize
|
240
240
|
super
|
241
241
|
@_prompt_was_called = false
|
242
|
-
@_context = ActiveAgent::ActionPrompt::Prompt.new(
|
243
|
-
instructions: prepare_instructions(options[:instructions]), options: options
|
244
|
-
)
|
242
|
+
@_context = ActiveAgent::ActionPrompt::Prompt.new(options: options)
|
245
243
|
end
|
246
244
|
|
247
245
|
def process(method_name, *args) # :nodoc:
|
@@ -296,7 +294,8 @@ module ActiveAgent
|
|
296
294
|
def prompt(headers = {}, &block)
|
297
295
|
return context if @_prompt_was_called && headers.blank? && !block
|
298
296
|
|
299
|
-
|
297
|
+
raw_instructions = headers.has_key?(:instructions) ? headers[:instructions] : context.options[:instructions]
|
298
|
+
context.instructions = prepare_instructions(raw_instructions)
|
300
299
|
context.options.merge!(options)
|
301
300
|
content_type = headers[:content_type]
|
302
301
|
headers = apply_defaults(headers)
|
@@ -338,7 +337,11 @@ module ActiveAgent
|
|
338
337
|
end
|
339
338
|
|
340
339
|
def action_schemas
|
340
|
+
prefixes = lookup_context.prefixes | [ self.class.agent_name ]
|
341
|
+
|
341
342
|
action_methods.map do |action|
|
343
|
+
next unless lookup_context.template_exists?(action, prefixes, false, formats: [ :json ])
|
344
|
+
|
342
345
|
JSON.parse render_to_string(locals: { action_name: action }, action: action, formats: :json)
|
343
346
|
end.compact
|
344
347
|
end
|
data/lib/active_agent/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeagent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Bowen
|
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
227
|
- !ruby/object:Gem::Version
|
228
228
|
version: '0'
|
229
229
|
requirements: []
|
230
|
-
rubygems_version: 3.
|
230
|
+
rubygems_version: 3.7.0
|
231
231
|
specification_version: 4
|
232
232
|
summary: Rails AI Agents Framework
|
233
233
|
test_files: []
|