Class: Legion::CLI::Chat::Tools::TriggerDream
- Inherits:
-
RubyLLM::Tool
- Object
- RubyLLM::Tool
- Legion::CLI::Chat::Tools::TriggerDream
- Defined in:
- lib/legion/cli/chat/tools/trigger_dream.rb
Constant Summary collapse
- DEFAULT_PORT =
4567- DEFAULT_HOST =
'127.0.0.1'- DREAM_RUNNER =
'Legion::Extensions::Agentic::Imagination::Dream::Runners::DreamCycle'- DREAM_FUNCTION =
'execute_dream_cycle'
Instance Method Summary collapse
Instance Method Details
#execute(action: 'trigger') ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/legion/cli/chat/tools/trigger_dream.rb', line 31 def execute(action: 'trigger') case action.to_s when 'journal' then handle_journal else handle_trigger end rescue Errno::ECONNREFUSED 'Legion daemon not running (cannot reach API).' rescue StandardError => e Legion::Logging.warn("TriggerDream#execute failed: #{e.}") if defined?(Legion::Logging) "Error: #{e.}" end |