Class: Arcp::Job::EventBody::ToolCall
- Inherits:
-
Data
- Object
- Data
- Arcp::Job::EventBody::ToolCall
- Defined in:
- lib/arcp/job/event_body/tool_call.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#call_id ⇒ Object
readonly
Returns the value of attribute call_id.
-
#tool ⇒ Object
readonly
Returns the value of attribute tool.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args
6 7 8 |
# File 'lib/arcp/job/event_body/tool_call.rb', line 6 def args @args end |
#call_id ⇒ Object (readonly)
Returns the value of attribute call_id
6 7 8 |
# File 'lib/arcp/job/event_body/tool_call.rb', line 6 def call_id @call_id end |
#tool ⇒ Object (readonly)
Returns the value of attribute tool
6 7 8 |
# File 'lib/arcp/job/event_body/tool_call.rb', line 6 def tool @tool end |
Class Method Details
.from_h(h) ⇒ Object
7 8 9 10 |
# File 'lib/arcp/job/event_body/tool_call.rb', line 7 def self.from_h(h) h = h.transform_keys(&:to_s) new(call_id: h.fetch('call_id'), tool: h.fetch('tool'), args: h['args'] || {}) end |
Instance Method Details
#to_h ⇒ Object
12 |
# File 'lib/arcp/job/event_body/tool_call.rb', line 12 def to_h = { 'call_id' => call_id, 'tool' => tool, 'args' => args } |