diff --git a/lib/generators/active_agent/templates/application_agent.rb.tt b/lib/generators/active_agent/templates/application_agent.rb.tt index ac94898b..4091927a 100644 --- a/lib/generators/active_agent/templates/application_agent.rb.tt +++ b/lib/generators/active_agent/templates/application_agent.rb.tt @@ -1,7 +1,7 @@ <% module_namespacing do -%> class ApplicationAgent < ActiveAgent::Base - layout 'agent' - + layout "agent" + generate_with :openai, model: "gpt-4o-mini", instructions: "You are a helpful assistant." end -<% end %> \ No newline at end of file +<% end %> diff --git a/lib/generators/erb/templates/application_agent.rb.tt b/lib/generators/erb/templates/application_agent.rb.tt deleted file mode 100644 index b3ebc1e7..00000000 --- a/lib/generators/erb/templates/application_agent.rb.tt +++ /dev/null @@ -1,7 +0,0 @@ -<% module_namespacing do -%> -class ApplicationAgent < ActiveAgent::Base - layout 'agent' - - generate_with :openai, model: "gpt-4o-mini", instructions: "You are a helpful assistant." -end -<% end %> diff --git a/test/generators/active_agent/agent_generator_test.rb b/test/generators/active_agent/agent_generator_test.rb index 83df70c5..d511cea1 100644 --- a/test/generators/active_agent/agent_generator_test.rb +++ b/test/generators/active_agent/agent_generator_test.rb @@ -29,7 +29,7 @@ class ActiveAgent::Generators::AgentGeneratorTest < Rails::Generators::TestCase assert_file "app/agents/application_agent.rb" do |content| assert_match(/class ApplicationAgent < ActiveAgent::Base/, content) - assert_match(/layout 'agent'/, content) + assert_match(/layout "agent"/, content) end end diff --git a/test/generators/active_agent/install_generator_test.rb b/test/generators/active_agent/install_generator_test.rb index 71ed90af..713e2825 100644 --- a/test/generators/active_agent/install_generator_test.rb +++ b/test/generators/active_agent/install_generator_test.rb @@ -17,7 +17,7 @@ class ActiveAgent::Generators::InstallGeneratorTest < Rails::Generators::TestCas assert_file "app/agents/application_agent.rb" do |content| assert_match(/class ApplicationAgent < ActiveAgent::Base/, content) - assert_match(/layout 'agent'/, content) + assert_match(/layout "agent"/, content) assert_match(/generate_with :openai/, content) end end