activeagent 0.6.1 → 0.6.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: 974e983d62e399bd41c40a34fc0869730d157a8361d74236e327b9aea7cd05e2
4
- data.tar.gz: 827c43ed21428ddc4138ecb8465af4265d432fbe3b3ca666f46f1b92b3598a44
3
+ metadata.gz: a07262fb92e03b08ab0abaad0cf2c9b6575a4aa1f6988899c9d0b2d9b081589c
4
+ data.tar.gz: '0619435e72d1a4e368c330956aa1295059c98c94a4c885e02b7781e82ba56260'
5
5
  SHA512:
6
- metadata.gz: 7ede550eb0aae62274dd13b631f862f202b172bb6ba40f837358bac71cc58760edc444722bc5a0aea747760b6317cf33630754992866fdc439a8263c1b670c03
7
- data.tar.gz: 80671e11f47c81ef591ed496c9a1ee126f32762d588787d3cd15a79eaf229f7da0b1c8e69cedfbd33509df92030a399ae2faaa5c346f9cf1cbedfdc25ee80819
6
+ metadata.gz: 3c7277d51950db30434643a67379467886cf40e2a100e4ada54556b88cafd4a92e314e02f06d2a94572b686c7064a28d1da94c3176e207452611b3d340d7d455
7
+ data.tar.gz: e14ae5c030fe0ce4b7c47915f4728dfa9474b7a465695ab9c0e2cb244136eb024bf8c1f6657b2178282091c98af4171b549927f55a38d195023d9d4f540979e1
@@ -10,7 +10,8 @@ module ActiveAgent
10
10
  @model_name = config["model"]
11
11
  @host = config["host"] || "http://localhost:11434"
12
12
  @api_version = config["api_version"] || "v1"
13
- @client = OpenAI::Client.new(uri_base: @host, access_token: @access_token, log_errors: Rails.env.development?, api_version: @api_version)
13
+ @api_type = config["api_type"] || nil
14
+ @client = OpenAI::Client.new(uri_base: @host, access_token: @access_token, log_errors: Rails.env.development?, api_version: @api_version, api_type: @api_type)
14
15
  end
15
16
 
16
17
  protected
@@ -22,6 +22,7 @@ module ActiveAgent
22
22
  def initialize(config)
23
23
  super
24
24
  @host = config["host"] || nil
25
+ @api_type = config["api_type"] || nil
25
26
  @access_token ||= config["api_key"] || config["access_token"] || OpenAI.configuration.access_token || ENV["OPENAI_ACCESS_TOKEN"]
26
27
  @organization_id = config["organization_id"] || OpenAI.configuration.organization_id || ENV["OPENAI_ORGANIZATION_ID"]
27
28
  @admin_token = config["admin_token"] || OpenAI.configuration.admin_token || ENV["OPENAI_ADMIN_TOKEN"]
@@ -30,6 +31,7 @@ module ActiveAgent
30
31
  uri_base: @host,
31
32
  organization_id: @organization_id,
32
33
  admin_token: @admin_token,
34
+ api_type: @api_type,
33
35
  log_errors: Rails.env.development?
34
36
  )
35
37
 
@@ -1,3 +1,3 @@
1
1
  module ActiveAgent
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.3"
3
3
  end
@@ -9,6 +9,14 @@ module ActiveAgent
9
9
 
10
10
  check_class_collision suffix: "Agent"
11
11
 
12
+ def initialize(*args, **kwargs)
13
+ super(*args, **kwargs)
14
+
15
+ # We must duplicate due to immutable hash
16
+ dup_options = options.dup
17
+ @options = dup_options.merge(template_engine: :erb)
18
+ end
19
+
12
20
  def create_agent_file
13
21
  template "agent.rb", File.join("app/agents", class_path, "#{file_name}_agent.rb")
14
22
 
@@ -6,6 +6,14 @@ module ActiveAgent
6
6
  class_option :skip_config, type: :boolean, default: false, desc: "Skip configuration file generation"
7
7
  class_option :formats, type: :array, default: [ "text" ], desc: "Specify formats to generate (text, html, json)"
8
8
 
9
+ def initialize(*args, **kwargs)
10
+ super(*args, **kwargs)
11
+
12
+ # We must duplicate due to immutable hash
13
+ dup_options = options.dup
14
+ @options = dup_options.merge(template_engine: :erb)
15
+ end
16
+
9
17
  def self.usage_path
10
18
  @usage_path ||= File.expand_path("../USAGE", __dir__)
11
19
  end
@@ -26,6 +34,7 @@ module ActiveAgent
26
34
  hook_for :template_engine
27
35
 
28
36
  private
37
+
29
38
  def formats
30
39
  options[:formats].map(&:to_sym)
31
40
  end
@@ -9,6 +9,14 @@ module Erb # :nodoc:
9
9
  argument :actions, type: :array, default: [], banner: "method method"
10
10
  class_option :formats, type: :array, default: [ "text" ], desc: "Specify formats to generate (text, html, json)"
11
11
 
12
+ def initialize(*args, **kwargs)
13
+ super(*args, **kwargs)
14
+
15
+ # We must duplicate due to immutable hash
16
+ dup_options = options.dup
17
+ @options = dup_options.merge(template_engine: :erb)
18
+ end
19
+
12
20
  def copy_view_files
13
21
  view_base_path = File.join("app/views", class_path, file_name + "_agent")
14
22
  empty_directory view_base_path
@@ -6,6 +6,14 @@ module Erb # :nodoc:
6
6
  source_root File.expand_path("templates", __dir__)
7
7
  class_option :formats, type: :array, default: [ "text" ], desc: "Specify formats to generate (text, html, json)"
8
8
 
9
+ def initialize(*args, **kwargs)
10
+ super(*args, **kwargs)
11
+
12
+ # We must duplicate due to immutable hash
13
+ dup_options = options.dup
14
+ @options = dup_options.merge(template_engine: :erb)
15
+ end
16
+
9
17
  def create_agent_layouts
10
18
  if behavior == :invoke
11
19
  formats.each do |format|
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeagent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Bowen
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2025-10-13 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: actionpack
@@ -361,6 +362,7 @@ metadata:
361
362
  documentation_uri: https://github.com/activeagents/activeagent
362
363
  source_code_uri: https://github.com/activeagents/activeagent
363
364
  rubygems_mfa_required: 'true'
365
+ post_install_message:
364
366
  rdoc_options: []
365
367
  require_paths:
366
368
  - lib
@@ -375,7 +377,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
375
377
  - !ruby/object:Gem::Version
376
378
  version: '0'
377
379
  requirements: []
378
- rubygems_version: 3.7.0
380
+ rubygems_version: 3.5.3
381
+ signing_key:
379
382
  specification_version: 4
380
383
  summary: Rails AI Agents Framework
381
384
  test_files: []