Class: Ruboty::OpenAIChat::Actions::RememberProfile
- Defined in:
- lib/ruboty/openai_chat/actions/remember_profile.rb
Constant Summary
Constants inherited from Base
Base::NAMESPACE, Base::PROFILE_KEY
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#client, #initialize, #memory, #openai_model, #pretexts, #robot
Constructor Details
This class inherits a constructor from Ruboty::OpenAIChat::Actions::Base
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ruboty/openai_chat/actions/remember_profile.rb', line 9 def call new_profile = [:body].strip memory.namespace(NAMESPACE)[PROFILE_KEY] = new_profile .reply("Remembered the profile.") rescue StandardError => e .reply(e., code: true) raise e if ENV["OPENAI_CHAT_DEBUG"] true end |