Class: Cadenya::Types::ToolApproved

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) ⇒ ToolApproved

Returns a new instance of ToolApproved.



5656
5657
5658
# File 'lib/cadenya/types.rb', line 5656

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.



5654
5655
5656
# File 'lib/cadenya/types.rb', line 5654

def tool_call_id
  @tool_call_id
end

Class Method Details

.from_json(data) ⇒ Object



5660
5661
5662
5663
5664
# File 'lib/cadenya/types.rb', line 5660

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

Instance Method Details

#to_hObject



5666
5667
5668
5669
5670
# File 'lib/cadenya/types.rb', line 5666

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