Module: Smith::Context::ObservationMasking
- Defined in:
- lib/smith/context/observation_masking.rb
Constant Summary collapse
- SYSTEM_ROLES =
%i[system].push("system").freeze
Class Method Summary collapse
Class Method Details
.apply(messages, strategy:, seed_message_count: 0) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/smith/context/observation_masking.rb', line 8 def self.apply(, strategy:, seed_message_count: 0) return unless strategy window = strategy[:window] return unless window prefix_count = strategy[:preserve_seed] == true ? : 0 prefix = .first(prefix_count) = .drop(prefix_count) prefix + () + recent_observations(, window) end |