Class: Botiasloop::Commands::Reset

Inherits:
Base
  • Object
show all
Defined in:
lib/botiasloop/commands/reset.rb

Overview

Reset command - clears conversation history

Instance Method Summary collapse

Methods inherited from Base

command, description, inherited

Instance Method Details

#execute(context, _args = nil) ⇒ Object



10
11
12
13
14
15
# File 'lib/botiasloop/commands/reset.rb', line 10

def execute(context, _args = nil)
  conversation = context.conversation
  conversation.reset!

  "Conversation #{conversation.uuid} history and tokens cleared."
end