Module: RubyBots::Chattable

Included in:
OpenAIChatBot, OpenAIChatTool
Defined in:
lib/ruby_bots/chattable.rb

Instance Method Summary collapse

Instance Method Details

#response(input, &block) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/ruby_bots/chattable.rb', line 3

def response(input, &block)
  run_input_validations(input)

  raise RubyBots::InvalidInputError, { errors: @errors } if @errors.any?

  run(input, &block)
end