Class: AgUiProtocol::Core::Events::ToolCallArgsEvent
- Inherits:
-
BaseEvent
- Object
- Types::Model
- BaseEvent
- AgUiProtocol::Core::Events::ToolCallArgsEvent
- Defined in:
- lib/ag_ui_protocol/core/events.rb
Overview
Represents a chunk of argument data for a tool call.
“‘ruby
event = AgUiProtocol::Core::Events::ToolCallArgsEvent.new(
tool_call_id: "tc1",
delta: "{\"q\":\"AG-UI\"}"
)
“‘
Instance Attribute Summary collapse
-
#delta ⇒ Object
readonly
Returns the value of attribute delta.
-
#tool_call_id ⇒ Object
readonly
Returns the value of attribute tool_call_id.
Attributes inherited from BaseEvent
Instance Method Summary collapse
-
#initialize(tool_call_id:, delta:, timestamp: nil, raw_event: nil) ⇒ ToolCallArgsEvent
constructor
A new instance of ToolCallArgsEvent.
- #to_h ⇒ Object
Methods inherited from Types::Model
Constructor Details
#initialize(tool_call_id:, delta:, timestamp: nil, raw_event: nil) ⇒ ToolCallArgsEvent
Returns a new instance of ToolCallArgsEvent.
376 377 378 379 380 |
# File 'lib/ag_ui_protocol/core/events.rb', line 376 def initialize(tool_call_id:, delta:, timestamp: nil, raw_event: nil) super(type: EventType::TOOL_CALL_ARGS, timestamp: , raw_event: raw_event) @tool_call_id = tool_call_id @delta = delta end |
Instance Attribute Details
#delta ⇒ Object (readonly)
Returns the value of attribute delta.
369 370 371 |
# File 'lib/ag_ui_protocol/core/events.rb', line 369 def delta @delta end |
#tool_call_id ⇒ Object (readonly)
Returns the value of attribute tool_call_id.
366 367 368 |
# File 'lib/ag_ui_protocol/core/events.rb', line 366 def tool_call_id @tool_call_id end |
Instance Method Details
#to_h ⇒ Object
383 384 385 |
# File 'lib/ag_ui_protocol/core/events.rb', line 383 def to_h super.merge(tool_call_id: @tool_call_id, delta: @delta) end |