Class: RubyLLM::Contract::Prompt::Renderer
- Inherits:
-
Object
- Object
- RubyLLM::Contract::Prompt::Renderer
- Defined in:
- lib/ruby_llm/contract/prompt/renderer.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.render(ast, variables: {}) ⇒ Object
15 16 17 |
# File 'lib/ruby_llm/contract/prompt/renderer.rb', line 15 def self.render(ast, variables: {}) new.render(ast, variables: variables) end |
Instance Method Details
#render(ast, variables: {}) ⇒ Object
9 10 11 12 13 |
# File 'lib/ruby_llm/contract/prompt/renderer.rb', line 9 def render(ast, variables: {}) ast.each_with_object([]) do |node, | render_node(node, variables, ) end end |