Class: Ruboty::OpenAIChat::Actions::ShowProfile
- Defined in:
- lib/ruboty/openai_chat/actions/show_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 20 |
# File 'lib/ruboty/openai_chat/actions/show_profile.rb', line 9 def call if (profile = memory.namespace(NAMESPACE)[PROFILE_KEY]) .reply(profile, code: true) else .reply("No profile is set.") end rescue StandardError => e .reply(e., code: true) raise e if ENV["OPENAI_CHAT_DEBUG"] true end |