activeagent 0.1.1 → 0.2.6.9
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/active_agent/action_prompt/README.md +92 -25
- data/lib/active_agent/action_prompt/action.rb +13 -0
- data/lib/active_agent/action_prompt/base.rb +127 -0
- data/lib/active_agent/action_prompt/message.rb +18 -16
- data/lib/active_agent/action_prompt/prompt.rb +14 -15
- data/lib/active_agent/base.rb +96 -58
- data/lib/active_agent/callbacks.rb +13 -0
- data/lib/active_agent/generation.rb +3 -3
- data/lib/active_agent/generation_job.rb +1 -1
- data/lib/active_agent/generation_provider/README.md +63 -8
- data/lib/active_agent/generation_provider/anthropic_provider.rb +142 -0
- data/lib/active_agent/generation_provider/base.rb +7 -2
- data/lib/active_agent/generation_provider/open_ai_provider.rb +95 -24
- data/lib/active_agent/generation_provider.rb +1 -2
- data/lib/active_agent/operation.rb +3 -3
- data/lib/active_agent/queued_generation.rb +1 -1
- data/lib/active_agent/railtie.rb +9 -11
- data/lib/active_agent/service.rb +1 -1
- data/lib/active_agent/version.rb +1 -1
- data/lib/active_agent.rb +7 -3
- data/lib/activeagent.rb +1 -0
- data/lib/generators/active_agent/agent_generator.rb +22 -22
- data/lib/generators/active_agent/install_generator.rb +21 -0
- data/lib/generators/active_agent/templates/active_agent.yml +6 -0
- data/lib/generators/active_agent/templates/agent.rb.tt +1 -1
- data/lib/generators/active_agent/templates/agent.text.erb +1 -0
- data/lib/generators/active_agent/templates/application_agent.rb.tt +7 -0
- metadata +65 -20
- data/README.md +0 -153
- data/Rakefile +0 -3
@@ -1,8 +1,9 @@
|
|
1
1
|
# lib/active_agent/generation_provider/open_ai_provider.rb
|
2
2
|
|
3
|
-
require_relative "base"
|
4
3
|
require "openai"
|
5
|
-
require "active_agent/
|
4
|
+
require "active_agent/action_prompt/action"
|
5
|
+
require_relative "base"
|
6
|
+
require_relative "response"
|
6
7
|
|
7
8
|
module ActiveAgent
|
8
9
|
module GenerationProvider
|
@@ -11,57 +12,127 @@ module ActiveAgent
|
|
11
12
|
super
|
12
13
|
@api_key = config["api_key"]
|
13
14
|
@model_name = config["model"] || "gpt-4o-mini"
|
14
|
-
@client = OpenAI::Client.new(
|
15
|
+
@client = OpenAI::Client.new(access_token: @api_key, log_errors: true)
|
15
16
|
end
|
16
17
|
|
17
18
|
def generate(prompt)
|
18
19
|
@prompt = prompt
|
19
|
-
parameters = prompt_parameters.merge(model: @model_name)
|
20
20
|
|
21
|
-
|
21
|
+
chat_prompt(parameters: prompt_parameters)
|
22
|
+
rescue => e
|
23
|
+
raise GenerationProviderError, e.message
|
24
|
+
end
|
22
25
|
|
26
|
+
def chat_prompt(parameters: prompt_parameters)
|
23
27
|
parameters[:stream] = provider_stream if prompt.options[:stream] || config["stream"]
|
24
28
|
|
25
|
-
|
26
|
-
|
29
|
+
chat_response(@client.chat(parameters: parameters))
|
30
|
+
end
|
31
|
+
|
32
|
+
def embed(prompt)
|
33
|
+
@prompt = prompt
|
34
|
+
|
35
|
+
embeddings_prompt(parameters: embeddings_parameters)
|
27
36
|
rescue => e
|
28
37
|
raise GenerationProviderError, e.message
|
29
38
|
end
|
30
39
|
|
40
|
+
def embeddings_parameters(input: prompt.message.content, model: "text-embedding-3-large")
|
41
|
+
{
|
42
|
+
model: model,
|
43
|
+
input: input
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
def embeddings_response(response)
|
48
|
+
message = Message.new(content: response.dig("data", 0, "embedding"), role: "assistant")
|
49
|
+
|
50
|
+
@response = ActiveAgent::GenerationProvider::Response.new(prompt: prompt, message: message, raw_response: response)
|
51
|
+
end
|
52
|
+
|
53
|
+
def embeddings_prompt(parameters:)
|
54
|
+
embeddings_response(@client.embeddings(parameters: embeddings_parameters))
|
55
|
+
end
|
56
|
+
|
31
57
|
private
|
32
58
|
|
33
59
|
def provider_stream
|
34
|
-
# prompt.
|
35
|
-
# config[:stream] will define a proc found in config stream would come from an Agent class's generate_with or stream_with method calls
|
36
|
-
agent_stream = prompt.
|
60
|
+
# prompt.options[:stream] will define a proc found in prompt at runtime
|
61
|
+
# config[:stream] will define a proc found in config. stream would come from an Agent class's generate_with or stream_with method calls
|
62
|
+
agent_stream = prompt.options[:stream]
|
63
|
+
message = ActiveAgent::ActionPrompt::Message.new(content: "", role: :assistant)
|
64
|
+
@response = ActiveAgent::GenerationProvider::Response.new(prompt: prompt, message:)
|
65
|
+
|
37
66
|
proc do |chunk, bytesize|
|
38
|
-
|
39
|
-
|
40
|
-
message = @prompt.messages.find { |message| message.response_number == chunk.dig("choices", 0, "index") }
|
41
|
-
message.update(content: message.content + new_content) if new_content
|
67
|
+
if (new_content = chunk.dig("choices", 0, "delta", "content"))
|
68
|
+
message.content += new_content
|
42
69
|
|
43
|
-
|
44
|
-
|
70
|
+
agent_stream.call(message, new_content, false) do |message, new_content|
|
71
|
+
yield message, new_content if block_given?
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
agent_stream.call(message, nil, true) do |message|
|
76
|
+
yield message, nil if block_given?
|
77
|
+
end
|
45
78
|
end
|
46
79
|
end
|
47
80
|
|
48
|
-
def prompt_parameters
|
81
|
+
def prompt_parameters(model: @prompt.options[:model] || @model_name, messages: @prompt.messages, temperature: @config["temperature"] || 0.7, tools: @prompt.actions)
|
49
82
|
{
|
50
|
-
|
51
|
-
|
52
|
-
|
83
|
+
model: model,
|
84
|
+
messages: provider_messages(messages),
|
85
|
+
temperature: temperature,
|
86
|
+
tools: tools.presence
|
53
87
|
}
|
54
88
|
end
|
55
89
|
|
56
|
-
def
|
90
|
+
def provider_messages(messages)
|
91
|
+
messages.map do |message|
|
92
|
+
provider_message = {
|
93
|
+
role: message.role,
|
94
|
+
tool_call_id: message.action_id.presence,
|
95
|
+
content: message.content,
|
96
|
+
type: message.content_type,
|
97
|
+
charset: message.charset
|
98
|
+
}.compact
|
99
|
+
|
100
|
+
if message.content_type == "image_url"
|
101
|
+
provider_message[:image_url] = {url: message.content}
|
102
|
+
end
|
103
|
+
provider_message
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def chat_response(response)
|
108
|
+
return @response if prompt.options[:stream]
|
109
|
+
|
57
110
|
message_json = response.dig("choices", 0, "message")
|
111
|
+
|
58
112
|
message = ActiveAgent::ActionPrompt::Message.new(
|
59
113
|
content: message_json["content"],
|
60
114
|
role: message_json["role"],
|
61
|
-
|
62
|
-
requested_actions: message_json["tool_calls"]
|
115
|
+
action_requested: message_json["finish_reason"] == "tool_calls",
|
116
|
+
requested_actions: handle_actions(message_json["tool_calls"])
|
63
117
|
)
|
64
|
-
|
118
|
+
update_context(prompt: prompt, message: message, response: response)
|
119
|
+
|
120
|
+
@response = ActiveAgent::GenerationProvider::Response.new(prompt: prompt, message: message, raw_response: response)
|
121
|
+
end
|
122
|
+
|
123
|
+
def handle_actions(tool_calls)
|
124
|
+
if tool_calls
|
125
|
+
tool_calls.map do |tool_call|
|
126
|
+
ActiveAgent::ActionPrompt::Action.new(
|
127
|
+
id: tool_call["id"],
|
128
|
+
name: tool_call.dig("function", "name"),
|
129
|
+
params: JSON.parse(
|
130
|
+
tool_call.dig("function", "arguments"),
|
131
|
+
{symbolize_names: true}
|
132
|
+
)
|
133
|
+
)
|
134
|
+
end
|
135
|
+
end
|
65
136
|
end
|
66
137
|
end
|
67
138
|
end
|
@@ -13,10 +13,9 @@ 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
|
-
|
20
19
|
config.merge!(options)
|
21
20
|
configure_provider(config)
|
22
21
|
end
|
@@ -2,12 +2,12 @@ module ActiveAgent
|
|
2
2
|
class Operation < AbstractController::Base
|
3
3
|
include AbstractController::Rendering
|
4
4
|
include ActionView::Rendering # Allows rendering of ERB templates without a view context tied to a request
|
5
|
-
append_view_path
|
6
|
-
|
5
|
+
append_view_path "app/views" # Ensure the controller knows where to look for view templates
|
6
|
+
|
7
7
|
def process_tool(tool_name, params)
|
8
8
|
send(tool_name, params) # Dynamically calls the method corresponding to tool_name
|
9
9
|
rescue NoMethodError
|
10
10
|
"Tool not found: #{tool_name}"
|
11
11
|
end
|
12
12
|
end
|
13
|
-
end
|
13
|
+
end
|
data/lib/active_agent/railtie.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require "active_job/railtie"
|
4
4
|
require "active_agent"
|
5
|
-
require "active_agent/engine"
|
5
|
+
# require "active_agent/engine"
|
6
6
|
require "rails"
|
7
7
|
require "abstract_controller/railties/routes_helpers"
|
8
8
|
|
@@ -10,7 +10,7 @@ module ActiveAgent
|
|
10
10
|
class Railtie < Rails::Railtie # :nodoc:
|
11
11
|
config.active_agent = ActiveSupport::OrderedOptions.new
|
12
12
|
config.active_agent.preview_paths = []
|
13
|
-
config.eager_load_namespaces <<
|
13
|
+
config.eager_load_namespaces << ActiveAgent
|
14
14
|
|
15
15
|
initializer "active_agent.deprecator", before: :load_environment_config do |app|
|
16
16
|
app.deprecators[:active_agent] = ActiveAgent.deprecator
|
@@ -35,6 +35,8 @@ module ActiveAgent
|
|
35
35
|
options.asset_host ||= app.config.asset_host
|
36
36
|
options.relative_url_root ||= app.config.relative_url_root
|
37
37
|
|
38
|
+
ActiveAgent.load_configuration(Rails.root.join("config", "active_agent.yml"))
|
39
|
+
|
38
40
|
ActiveSupport.on_load(:active_agent) do
|
39
41
|
include AbstractController::UrlFor
|
40
42
|
extend ::AbstractController::Railties::RoutesHelpers.with(app.routes, false)
|
@@ -46,25 +48,21 @@ module ActiveAgent
|
|
46
48
|
self.view_paths = ["#{Rails.root}/app/views"]
|
47
49
|
self.preview_paths |= options[:preview_paths]
|
48
50
|
|
49
|
-
if
|
50
|
-
self.
|
51
|
-
end
|
52
|
-
|
53
|
-
if options.smtp_settings
|
54
|
-
self.smtp_settings = options.smtp_settings
|
51
|
+
if (generation_job = options.delete(:generation_job))
|
52
|
+
self.generation_job = generation_job.constantize
|
55
53
|
end
|
56
54
|
|
57
55
|
options.each { |k, v| send(:"#{k}=", v) }
|
58
56
|
end
|
59
57
|
|
60
58
|
ActiveSupport.on_load(:action_dispatch_integration_test) do
|
61
|
-
include ActiveAgent::TestHelper
|
62
|
-
include ActiveAgent::TestCase::ClearTestDeliveries
|
59
|
+
# include ActiveAgent::TestHelper
|
60
|
+
# include ActiveAgent::TestCase::ClearTestDeliveries
|
63
61
|
end
|
64
62
|
end
|
65
63
|
|
66
64
|
initializer "active_agent.set_autoload_paths", before: :set_autoload_paths do |app|
|
67
|
-
options = app.config.active_agent
|
65
|
+
# options = app.config.active_agent
|
68
66
|
# app.config.paths["test/agents/previews"].concat(options.preview_paths)
|
69
67
|
end
|
70
68
|
|
data/lib/active_agent/service.rb
CHANGED
data/lib/active_agent/version.rb
CHANGED
data/lib/active_agent.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require "yaml"
|
2
2
|
require "abstract_controller"
|
3
|
+
require "active_agent/action_prompt"
|
4
|
+
require "active_agent/generation_provider"
|
3
5
|
require "active_agent/version"
|
4
6
|
require "active_agent/deprecator"
|
5
7
|
require "active_agent/railtie" if defined?(Rails)
|
@@ -47,9 +49,11 @@ module ActiveAgent
|
|
47
49
|
end
|
48
50
|
|
49
51
|
def load_configuration(file)
|
50
|
-
|
51
|
-
|
52
|
-
|
52
|
+
if File.exist?(file)
|
53
|
+
config_file = YAML.load(ERB.new(File.read(file)).result)
|
54
|
+
env = ENV["RAILS_ENV"] || ENV["ENV"] || "development"
|
55
|
+
@config = config_file[env] || config_file
|
56
|
+
end
|
53
57
|
end
|
54
58
|
end
|
55
59
|
end
|
data/lib/activeagent.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "active_agent"
|
@@ -7,10 +7,10 @@ module ActiveAgent
|
|
7
7
|
|
8
8
|
argument :actions, type: :array, default: [], banner: "method method"
|
9
9
|
|
10
|
-
check_class_collision
|
10
|
+
check_class_collision
|
11
11
|
|
12
12
|
def create_agent_file
|
13
|
-
template "agent.rb", File.join("app/agents", class_path, "#{file_name}
|
13
|
+
template "agent.rb", File.join("app/agents", class_path, "#{file_name}.rb")
|
14
14
|
|
15
15
|
in_root do
|
16
16
|
if behavior == :invoke && !File.exist?(application_agent_file_name)
|
@@ -31,33 +31,33 @@ module ActiveAgent
|
|
31
31
|
actions.each do |action|
|
32
32
|
@action = action
|
33
33
|
@schema_path = File.join("app/views", class_path, file_name, "#{action}.json.jbuilder")
|
34
|
-
@view_path = File.join("app/views", class_path, file_name, "#{action}.html
|
34
|
+
@view_path = File.join("app/views", class_path, file_name, "#{action}.html.erb")
|
35
35
|
template "action.json.jbuilder", @schema_path
|
36
|
-
template "action.html
|
36
|
+
template "action.html.erb", @view_path
|
37
37
|
end
|
38
38
|
end
|
39
|
-
|
40
39
|
|
41
40
|
private
|
42
|
-
def test_framework
|
43
|
-
::Rails.application.config.generators.options[:rails][:test_framework]
|
44
|
-
end
|
45
|
-
|
46
|
-
def template_engine
|
47
|
-
::Rails.application.config.generators.options[:rails][:template_engine]
|
48
|
-
end
|
49
|
-
|
50
|
-
def file_name # :doc:
|
51
|
-
@_file_name ||= super + "_agent"
|
52
|
-
end
|
53
41
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
42
|
+
def test_framework
|
43
|
+
::Rails.application.config.generators.options[:rails][:test_framework]
|
44
|
+
end
|
45
|
+
|
46
|
+
def template_engine
|
47
|
+
::Rails.application.config.generators.options[:rails][:template_engine]
|
48
|
+
end
|
49
|
+
|
50
|
+
def file_name # :doc:
|
51
|
+
@_file_name ||= super + "_agent"
|
52
|
+
end
|
53
|
+
|
54
|
+
def application_agent_file_name
|
55
|
+
@_application_agent_file_name ||= if mountable_engine?
|
56
|
+
"app/agents/#{namespaced_path}/application_agent.rb"
|
57
|
+
else
|
58
|
+
"app/agents/application_agent.rb"
|
60
59
|
end
|
60
|
+
end
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActiveAgent
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < ::Rails::Generators::Base
|
6
|
+
source_root File.expand_path("templates", __dir__)
|
7
|
+
|
8
|
+
def create_configuration
|
9
|
+
template "active_agent.yml", "config/active_agent.yml"
|
10
|
+
end
|
11
|
+
|
12
|
+
def create_application_agent
|
13
|
+
template "application_agent.rb", "app/agents/application_agent.rb"
|
14
|
+
end
|
15
|
+
|
16
|
+
def create_agent_layout_template
|
17
|
+
template "agent.text.erb", "app/views/layouts/agent.text.erb"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|
@@ -1,4 +1,11 @@
|
|
1
1
|
<% module_namespacing do -%>
|
2
2
|
class ApplicationAgent < ActiveAgent::Base
|
3
|
+
layout 'agent'
|
4
|
+
|
5
|
+
generate_with :openai, model: "gpt-4o-mini", instructions: "You are a helpful assistant."
|
6
|
+
|
7
|
+
def text_prompt
|
8
|
+
prompt { |format| format.text { render plain: params[:message] } }
|
9
|
+
end
|
3
10
|
end
|
4
11
|
<% end %>
|
metadata
CHANGED
@@ -1,112 +1,148 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeagent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.6.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Bowen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '7.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '9.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '7.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '9.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: actionview
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
39
|
version: '7.2'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '9.0'
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
|
-
- - "
|
47
|
+
- - ">="
|
39
48
|
- !ruby/object:Gem::Version
|
40
49
|
version: '7.2'
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '9.0'
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
54
|
name: activesupport
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
44
56
|
requirements:
|
45
|
-
- - "
|
57
|
+
- - ">="
|
46
58
|
- !ruby/object:Gem::Version
|
47
59
|
version: '7.2'
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '9.0'
|
48
63
|
type: :runtime
|
49
64
|
prerelease: false
|
50
65
|
version_requirements: !ruby/object:Gem::Requirement
|
51
66
|
requirements:
|
52
|
-
- - "
|
67
|
+
- - ">="
|
53
68
|
- !ruby/object:Gem::Version
|
54
69
|
version: '7.2'
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '9.0'
|
55
73
|
- !ruby/object:Gem::Dependency
|
56
74
|
name: activemodel
|
57
75
|
requirement: !ruby/object:Gem::Requirement
|
58
76
|
requirements:
|
59
|
-
- - "
|
77
|
+
- - ">="
|
60
78
|
- !ruby/object:Gem::Version
|
61
79
|
version: '7.2'
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '9.0'
|
62
83
|
type: :runtime
|
63
84
|
prerelease: false
|
64
85
|
version_requirements: !ruby/object:Gem::Requirement
|
65
86
|
requirements:
|
66
|
-
- - "
|
87
|
+
- - ">="
|
67
88
|
- !ruby/object:Gem::Version
|
68
89
|
version: '7.2'
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '9.0'
|
69
93
|
- !ruby/object:Gem::Dependency
|
70
94
|
name: activejob
|
71
95
|
requirement: !ruby/object:Gem::Requirement
|
72
96
|
requirements:
|
73
|
-
- - "
|
97
|
+
- - ">="
|
74
98
|
- !ruby/object:Gem::Version
|
75
99
|
version: '7.2'
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '9.0'
|
76
103
|
type: :runtime
|
77
104
|
prerelease: false
|
78
105
|
version_requirements: !ruby/object:Gem::Requirement
|
79
106
|
requirements:
|
80
|
-
- - "
|
107
|
+
- - ">="
|
81
108
|
- !ruby/object:Gem::Version
|
82
109
|
version: '7.2'
|
110
|
+
- - "<"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '9.0'
|
83
113
|
- !ruby/object:Gem::Dependency
|
84
114
|
name: rails
|
85
115
|
requirement: !ruby/object:Gem::Requirement
|
86
116
|
requirements:
|
87
|
-
- - "
|
117
|
+
- - ">="
|
88
118
|
- !ruby/object:Gem::Version
|
89
119
|
version: '7.2'
|
120
|
+
- - "<"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '9.0'
|
90
123
|
type: :runtime
|
91
124
|
prerelease: false
|
92
125
|
version_requirements: !ruby/object:Gem::Requirement
|
93
126
|
requirements:
|
94
|
-
- - "
|
127
|
+
- - ">="
|
95
128
|
- !ruby/object:Gem::Version
|
96
129
|
version: '7.2'
|
97
|
-
|
98
|
-
|
130
|
+
- - "<"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '9.0'
|
133
|
+
description: The only agent-oriented AI framework designed for Rails, where Agents
|
134
|
+
are Controllers. Build AI features with less complexity using the MVC conventions
|
135
|
+
you love.
|
99
136
|
email: jusbowen@gmail.com
|
100
137
|
executables: []
|
101
138
|
extensions: []
|
102
139
|
extra_rdoc_files: []
|
103
140
|
files:
|
104
|
-
- README.md
|
105
|
-
- Rakefile
|
106
141
|
- lib/active_agent.rb
|
107
142
|
- lib/active_agent/README.md
|
108
143
|
- lib/active_agent/action_prompt.rb
|
109
144
|
- lib/active_agent/action_prompt/README.md
|
145
|
+
- lib/active_agent/action_prompt/action.rb
|
110
146
|
- lib/active_agent/action_prompt/base.rb
|
111
147
|
- lib/active_agent/action_prompt/collector.rb
|
112
148
|
- lib/active_agent/action_prompt/message.rb
|
@@ -120,6 +156,7 @@ files:
|
|
120
156
|
- lib/active_agent/generation_methods.rb
|
121
157
|
- lib/active_agent/generation_provider.rb
|
122
158
|
- lib/active_agent/generation_provider/README.md
|
159
|
+
- lib/active_agent/generation_provider/anthropic_provider.rb
|
123
160
|
- lib/active_agent/generation_provider/base.rb
|
124
161
|
- lib/active_agent/generation_provider/open_ai_provider.rb
|
125
162
|
- lib/active_agent/generation_provider/response.rb
|
@@ -135,18 +172,26 @@ files:
|
|
135
172
|
- lib/active_agent/service.rb
|
136
173
|
- lib/active_agent/test_case.rb
|
137
174
|
- lib/active_agent/version.rb
|
175
|
+
- lib/activeagent.rb
|
138
176
|
- lib/generators/active_agent/USAGE
|
139
177
|
- lib/generators/active_agent/agent_generator.rb
|
178
|
+
- lib/generators/active_agent/install_generator.rb
|
140
179
|
- lib/generators/active_agent/templates/action.html.erb.tt
|
141
180
|
- lib/generators/active_agent/templates/action.json.jbuilder.tt
|
181
|
+
- lib/generators/active_agent/templates/active_agent.yml
|
142
182
|
- lib/generators/active_agent/templates/agent.rb.tt
|
183
|
+
- lib/generators/active_agent/templates/agent.text.erb
|
143
184
|
- lib/generators/active_agent/templates/agent_spec.rb.tt
|
144
185
|
- lib/generators/active_agent/templates/agent_test.rb.tt
|
145
186
|
- lib/generators/active_agent/templates/application_agent.rb.tt
|
146
|
-
homepage: https://
|
187
|
+
homepage: https://activeagents.ai
|
147
188
|
licenses:
|
148
189
|
- MIT
|
149
|
-
metadata:
|
190
|
+
metadata:
|
191
|
+
bug_tracker_uri: https://github.com/activeagents/activeagent/issues
|
192
|
+
documentation_uri: https://github.com/activeagents/activeagent
|
193
|
+
source_code_uri: https://github.com/activeagents/activeagent
|
194
|
+
rubygems_mfa_required: 'true'
|
150
195
|
post_install_message:
|
151
196
|
rdoc_options: []
|
152
197
|
require_paths:
|