activeagent 0.2.4.rc2 → 0.2.4.rc3
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: c6684dac1f6880f636a2a20e4f09899ae36b214bbaeab15a2cf5a95a12a6befb
|
4
|
+
data.tar.gz: 2663c2e96874538f1809436a4696c40bc775bea3bceeea42d216c89780167f6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9231bc4c9c4f44d4f7d45b9ac79ae2f1a5d192511872ee27491da2a59e00f53097a0ee669dbbde4fb6f889794af3a687d7f0e17ff744b6fba3e525c5f810fb0a
|
7
|
+
data.tar.gz: 383b90bd9d3b53cd6de5fc3a6758b8627ca82c022a543412f6241e6f90ae37ec054b560b56634c395f754922492c0df8fe34102274067fa77cac74bc794710b3
|
@@ -6,7 +6,7 @@ module ActiveAgent
|
|
6
6
|
attr_accessor :content, :role, :name, :action_requested, :requested_actions, :content_type, :charset
|
7
7
|
|
8
8
|
def initialize(attributes = {})
|
9
|
-
@action_requested =
|
9
|
+
@action_requested = false
|
10
10
|
@agent_class = attributes[:agent_class]
|
11
11
|
@charset = attributes[:charset] || "UTF-8"
|
12
12
|
@content = attributes[:content] || ""
|
@@ -14,6 +14,7 @@ module ActiveAgent
|
|
14
14
|
@name = attributes[:name]
|
15
15
|
@role = attributes[:role] || :user
|
16
16
|
@requested_actions = attributes[:requested_actions] || []
|
17
|
+
@action_requested = @requested_actions.any?
|
17
18
|
validate_role
|
18
19
|
end
|
19
20
|
|
@@ -13,7 +13,7 @@ module ActiveAgent
|
|
13
13
|
|
14
14
|
module ClassMethods
|
15
15
|
def configuration(provider_name, **options)
|
16
|
-
config = ActiveAgent.config[provider_name.to_s] || ActiveAgent.config
|
16
|
+
config = ActiveAgent.config[provider_name.to_s] || ActiveAgent.config.dig(ENV["RAILS_ENV"], provider_name.to_s)
|
17
17
|
|
18
18
|
raise "Configuration not found for provider: #{provider_name}" unless config
|
19
19
|
config.merge!(options)
|
data/lib/active_agent/version.rb
CHANGED
@@ -16,14 +16,6 @@ module ActiveAgent
|
|
16
16
|
def create_application_agent
|
17
17
|
template "application_agent.rb", "app/agents/application_agent.rb"
|
18
18
|
end
|
19
|
-
|
20
|
-
def create_agents_directory
|
21
|
-
empty_directory "app/agents"
|
22
|
-
end
|
23
|
-
|
24
|
-
def show_readme
|
25
|
-
readme "README" if behavior == :invoke
|
26
|
-
end
|
27
19
|
end
|
28
20
|
end
|
29
21
|
end
|