class Riffer::StreamEvents::ToolCallDelta
Riffer::StreamEvents::ToolCallDelta represents an incremental tool call chunk during streaming.
Emitted when the LLM is building a tool call, containing partial argument data.
Attributes
The incremental arguments JSON fragment.
The tool call item identifier.
The tool name (may only be present in first delta).
Public Class Methods
Source
# File lib/riffer/stream_events/tool_call_delta.rb, line 18 def initialize(item_id:, arguments_delta:, name: nil, role: :assistant) super(role: role) @item_id = item_id @name = name @arguments_delta = arguments_delta end
: (item_id: String, arguments_delta: String, ?name: String?, ?role: Symbol) -> void
Calls superclass method
Riffer::StreamEvents::Base::new
Public Instance Methods
Source
# File lib/riffer/stream_events/tool_call_delta.rb, line 26 def to_h {role: @role, item_id: @item_id, name: @name, arguments_delta: @arguments_delta}.compact end
: () -> Hash[Symbol, untyped]