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.
877 878 879 880 881 882 883 |
# File 'lib/ag_ui_protocol/core/events.rb', line 877 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.
861 862 863 |
# File 'lib/ag_ui_protocol/core/events.rb', line 861 def input @input end |
#parent_run_id ⇒ Object (readonly)
Returns the value of attribute parent_run_id.
858 859 860 |
# File 'lib/ag_ui_protocol/core/events.rb', line 858 def parent_run_id @parent_run_id end |
#run_id ⇒ Object (readonly)
Returns the value of attribute run_id.
855 856 857 |
# File 'lib/ag_ui_protocol/core/events.rb', line 855 def run_id @run_id end |
#thread_id ⇒ Object (readonly)
Returns the value of attribute thread_id.
852 853 854 |
# File 'lib/ag_ui_protocol/core/events.rb', line 852 def thread_id @thread_id end |
Instance Method Details
#to_h ⇒ Object
886 887 888 889 890 891 892 893 |
# File 'lib/ag_ui_protocol/core/events.rb', line 886 def to_h super.merge( thread_id: @thread_id, run_id: @run_id, parent_run_id: @parent_run_id, input: @input ) end |