Class: AgUiProtocol::Core::Events::RunStartedEvent
- Inherits:
-
BaseEvent
- Object
- Types::Model
- BaseEvent
- AgUiProtocol::Core::Events::RunStartedEvent
- Defined in:
- lib/ag_ui_protocol/core/events.rb
Overview
Signals the start of an agent run.
“‘ruby
input = AgUiProtocol::Core::Types::RunAgentInput.new(
thread_id: "t1",
run_id: "r1",
state: {},
messages: [],
tools: [],
context: [],
forwarded_props: {}
)
event = AgUiProtocol::Core::Events::RunStartedEvent.new(
thread_id: "t1",
run_id: "r1",
parent_run_id: nil,
input: input
)
“‘
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#parent_run_id ⇒ Object
readonly
Returns the value of attribute parent_run_id.
-
#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:, parent_run_id: nil, input: nil, timestamp: nil, raw_event: nil) ⇒ RunStartedEvent
constructor
A new instance of RunStartedEvent.
- #to_h ⇒ Object
Methods inherited from Types::Model
Constructor Details
#initialize(thread_id:, run_id:, parent_run_id: nil, input: nil, timestamp: nil, raw_event: nil) ⇒ RunStartedEvent
Returns a new instance of RunStartedEvent.
909 910 911 912 913 914 915 |
# File 'lib/ag_ui_protocol/core/events.rb', line 909 def initialize(thread_id:, run_id:, parent_run_id: nil, input: nil, timestamp: nil, raw_event: nil) super(type: EventType::RUN_STARTED, timestamp: , raw_event: raw_event) @thread_id = thread_id @run_id = run_id @parent_run_id = parent_run_id @input = input end |
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
891 892 893 |
# File 'lib/ag_ui_protocol/core/events.rb', line 891 def input @input end |
#parent_run_id ⇒ Object (readonly)
Returns the value of attribute parent_run_id.
888 889 890 |
# File 'lib/ag_ui_protocol/core/events.rb', line 888 def parent_run_id @parent_run_id end |
#run_id ⇒ Object (readonly)
Returns the value of attribute run_id.
885 886 887 |
# File 'lib/ag_ui_protocol/core/events.rb', line 885 def run_id @run_id end |
#thread_id ⇒ Object (readonly)
Returns the value of attribute thread_id.
882 883 884 |
# File 'lib/ag_ui_protocol/core/events.rb', line 882 def thread_id @thread_id end |
Instance Method Details
#to_h ⇒ Object
918 919 920 921 922 923 924 925 |
# File 'lib/ag_ui_protocol/core/events.rb', line 918 def to_h super.merge( thread_id: @thread_id, run_id: @run_id, parent_run_id: @parent_run_id, input: @input ) end |