Class: Riffer::StreamEvents::ToolCallDone
- Defined in:
- lib/riffer/stream_events/tool_call_done.rb
Overview
Represents a completed tool call during streaming.
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
The complete arguments JSON string.
-
#call_id ⇒ Object
readonly
The call identifier for response matching.
-
#item_id ⇒ Object
readonly
The tool call item identifier.
-
#name ⇒ Object
readonly
The tool name.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(item_id:, call_id:, name:, arguments:, role: :assistant) ⇒ ToolCallDone
constructor
– : (item_id: String, call_id: String, name: String, arguments: String, ?role: Symbol) -> void.
-
#to_h ⇒ Object
– : () -> Hash[Symbol, untyped].
Constructor Details
#initialize(item_id:, call_id:, name:, arguments:, role: :assistant) ⇒ ToolCallDone
– : (item_id: String, call_id: String, name: String, arguments: String, ?role: Symbol) -> void
20 21 22 23 24 25 26 |
# File 'lib/riffer/stream_events/tool_call_done.rb', line 20 def initialize(item_id:, call_id:, name:, arguments:, role: :assistant) super(role: role) @item_id = item_id @call_id = call_id @name = name @arguments = arguments end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
The complete arguments JSON string.
16 17 18 |
# File 'lib/riffer/stream_events/tool_call_done.rb', line 16 def arguments @arguments end |
#call_id ⇒ Object (readonly)
The call identifier for response matching.
10 11 12 |
# File 'lib/riffer/stream_events/tool_call_done.rb', line 10 def call_id @call_id end |
#item_id ⇒ Object (readonly)
The tool call item identifier.
7 8 9 |
# File 'lib/riffer/stream_events/tool_call_done.rb', line 7 def item_id @item_id end |
#name ⇒ Object (readonly)
The tool name.
13 14 15 |
# File 'lib/riffer/stream_events/tool_call_done.rb', line 13 def name @name end |
Instance Method Details
#to_h ⇒ Object
– : () -> Hash[Symbol, untyped]
30 31 32 |
# File 'lib/riffer/stream_events/tool_call_done.rb', line 30 def to_h {role: @role, item_id: @item_id, call_id: @call_id, name: @name, arguments: @arguments} end |