Class: Jambots::Renderers::CliRenderer
- Inherits:
-
Object
- Object
- Jambots::Renderers::CliRenderer
- Defined in:
- lib/jambots/renderers/cli_renderer.rb
Instance Method Summary collapse
Instance Method Details
#render(conversation, &block) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/jambots/renderers/cli_renderer.rb', line 8 def render(conversation, &block) spinner.auto_spin = block.call spinner.success print_line(role_header([:role])) puts pastel.magenta([:content]) print_line("#{conversation.key} ") rescue Jambots::ChatClientError => e spinner.success warn "ERROR: #{e.}" exit(1) end |