Module: RCrewAI::Events
- Defined in:
- lib/rcrewai/events.rb
Defined Under Namespace
Classes: Error, Event, IterationEnd, IterationStart, TextDelta, TextDone, Thinking, ToolCallError, ToolCallResult, ToolCallStart, Usage
Constant Summary collapse
- BASE_ATTRS =
%i[type timestamp agent iteration].freeze
Class Method Summary collapse
Class Method Details
.fan_out(sinks) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rcrewai/events.rb', line 19 def self.fan_out(sinks) sinks = Array(sinks).compact lambda do |event| sinks.each do |s| s.call(event) rescue StandardError => e Kernel.warn "[rcrewai] event sink raised: #{e.class}: #{e.}" end end end |