Class: RubyLLM::Generators::ToolGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- RubyLLM::Generators::ToolGenerator
- Defined in:
- lib/generators/ruby_llm/tool/tool_generator.rb
Overview
Generator for RubyLLM tool classes and related message partials.
Instance Method Summary collapse
Instance Method Details
#create_tool_file ⇒ Object
17 18 19 |
# File 'lib/generators/ruby_llm/tool/tool_generator.rb', line 17 def create_tool_file template 'tool.rb.tt', File.join('app/tools', class_path, "#{file_name}_tool.rb") end |
#create_tool_view_partials ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/generators/ruby_llm/tool/tool_generator.rb', line 21 def create_tool_view_partials empty_directory 'app/views/messages/tool_calls' empty_directory 'app/views/messages/tool_results' create_tool_call_partial create_tool_result_partial end |