Module: Legion::Gaia::Advisory
- Defined in:
- lib/legion/gaia/advisory.rb
Class Method Summary collapse
-
.advise(caller:, conversation_id: nil, messages: nil) ⇒ Object
Fast in-memory advisory.
Class Method Details
.advise(caller:, conversation_id: nil, messages: nil) ⇒ Object
Fast in-memory advisory. NEVER makes LLM calls. Returns Hash with optional keys: system_prompt, routing_hint, context_window, tool_hint, suppress, valence
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/legion/gaia/advisory.rb', line 11 def advise(caller:, conversation_id: nil, messages: nil) # rubocop:disable Lint/UnusedMethodArgument return nil unless Gaia.started? advisory = {} advisory[:valence] = Gaia.last_valences if Gaia.last_valences merge_tick_data!(advisory, Gaia.registry&.tick_host&.last_tick_result) merge_observer_data!(advisory, caller) advisory.compact rescue StandardError => e Legion::Logging.warn("GAIA advisory failed: #{e.}") if defined?(Legion::Logging) nil end |