Class: Riffer::StreamEvents::ToolCallDone
- Defined in:
- lib/riffer/stream_events/tool_call_done.rb
Overview
Riffer::StreamEvents::ToolCallDone represents a completed tool call during streaming.
Emitted when the LLM has finished building a tool call with complete arguments.
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
22 23 24 25 26 27 28 |
# File 'lib/riffer/stream_events/tool_call_done.rb', line 22 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.
18 19 20 |
# File 'lib/riffer/stream_events/tool_call_done.rb', line 18 def arguments @arguments end |
#call_id ⇒ Object (readonly)
The call identifier for response matching.
12 13 14 |
# File 'lib/riffer/stream_events/tool_call_done.rb', line 12 def call_id @call_id end |
#item_id ⇒ Object (readonly)
The tool call item identifier.
9 10 11 |
# File 'lib/riffer/stream_events/tool_call_done.rb', line 9 def item_id @item_id end |
#name ⇒ Object (readonly)
The tool name.
15 16 17 |
# File 'lib/riffer/stream_events/tool_call_done.rb', line 15 def name @name end |
Instance Method Details
#to_h ⇒ Object
– : () -> Hash[Symbol, untyped]
32 33 34 |
# File 'lib/riffer/stream_events/tool_call_done.rb', line 32 def to_h {role: @role, item_id: @item_id, call_id: @call_id, name: @name, arguments: @arguments} end |