Class: AgUiProtocol::Core::Events::RunFinishedEvent
- Inherits:
-
BaseEvent
- Object
- Types::Model
- BaseEvent
- AgUiProtocol::Core::Events::RunFinishedEvent
- Defined in:
- lib/ag_ui_protocol/core/events.rb
Overview
Signals the successful completion of an agent run.
“‘ruby
event = AgUiProtocol::Core::Events::RunFinishedEvent.new(thread_id: “t1”, run_id: “r1”, result: { “a” => 1 })
“‘
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#run_id ⇒ Object
readonly
Returns the value of attribute run_id.
-
#thread_id ⇒ Object
readonly
Returns the value of attribute thread_id.
Attributes inherited from BaseEvent
Instance Method Summary collapse
-
#initialize(thread_id:, run_id:, result: nil, timestamp: nil, raw_event: nil) ⇒ RunFinishedEvent
constructor
A new instance of RunFinishedEvent.
- #to_h ⇒ Object
Methods inherited from Types::Model
Constructor Details
#initialize(thread_id:, run_id:, result: nil, timestamp: nil, raw_event: nil) ⇒ RunFinishedEvent
Returns a new instance of RunFinishedEvent.
921 922 923 924 925 926 |
# File 'lib/ag_ui_protocol/core/events.rb', line 921 def initialize(thread_id:, run_id:, result: nil, timestamp: nil, raw_event: nil) super(type: EventType::RUN_FINISHED, timestamp: , raw_event: raw_event) @thread_id = thread_id @run_id = run_id @result = result end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
913 914 915 |
# File 'lib/ag_ui_protocol/core/events.rb', line 913 def result @result end |
#run_id ⇒ Object (readonly)
Returns the value of attribute run_id.
910 911 912 |
# File 'lib/ag_ui_protocol/core/events.rb', line 910 def run_id @run_id end |
#thread_id ⇒ Object (readonly)
Returns the value of attribute thread_id.
907 908 909 |
# File 'lib/ag_ui_protocol/core/events.rb', line 907 def thread_id @thread_id end |
Instance Method Details
#to_h ⇒ Object
929 930 931 |
# File 'lib/ag_ui_protocol/core/events.rb', line 929 def to_h super.merge(thread_id: @thread_id, run_id: @run_id, result: @result) end |