Class: Cadenya::Types::ToolApprovalRequested

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tool_call_id: nil) ⇒ ToolApprovalRequested

Returns a new instance of ToolApprovalRequested.



5636
5637
5638
# File 'lib/cadenya/types.rb', line 5636

def initialize(tool_call_id: nil)
  @tool_call_id = tool_call_id
end

Instance Attribute Details

#tool_call_idObject (readonly)

Returns the value of attribute tool_call_id.



5634
5635
5636
# File 'lib/cadenya/types.rb', line 5634

def tool_call_id
  @tool_call_id
end

Class Method Details

.from_json(data) ⇒ Object



5640
5641
5642
5643
5644
# File 'lib/cadenya/types.rb', line 5640

def self.from_json(data)
  new(
    tool_call_id: data["toolCallId"],
  )
end

Instance Method Details

#to_hObject



5646
5647
5648
5649
5650
# File 'lib/cadenya/types.rb', line 5646

def to_h
  {
    tool_call_id: Util.plain(@tool_call_id),
  }.reject { |_k, v| v.nil? }
end