class RubyLLM::Prompt::Roots
The ordered directories searched for prompt files, and for skills through Skill.roots. The application’s directory is always first, so an application can override any prompt or skill an engine ships by placing its own at the same relative path. Engines append their own directories in an initializer:
initializer "my_engine.prompts" do RubyLLM::Prompt.roots << MyEngine::Engine.root.join("app/prompts") RubyLLM::Skill.roots << MyEngine::Engine.root.join("app/skills") end
Public Instance Methods
Source
# File lib/ruby_llm/prompt.rb, line 29 def <<(path) @registered << Pathname.new(path) self end
Appends a prompt directory and returns self.
Also aliased as: push
Source
# File lib/ruby_llm/prompt.rb, line 36 def each(&) [@default.call, *@registered].each(&) end
Yields each prompt directory in lookup order. Returns an Enumerator without a block.