Class: Cadenya::Types::ApproveToolCallRequest

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(workspace_id: nil, objective_id: nil, tool_call_id: nil) ⇒ ApproveToolCallRequest

Returns a new instance of ApproveToolCallRequest.



841
842
843
844
845
# File 'lib/cadenya/types.rb', line 841

def initialize(workspace_id: nil, objective_id: nil, tool_call_id: nil)
  @workspace_id = workspace_id
  @objective_id = objective_id
  @tool_call_id = tool_call_id
end

Instance Attribute Details

#objective_idObject (readonly)

Returns the value of attribute objective_id.



839
840
841
# File 'lib/cadenya/types.rb', line 839

def objective_id
  @objective_id
end

#tool_call_idObject (readonly)

Returns the value of attribute tool_call_id.



839
840
841
# File 'lib/cadenya/types.rb', line 839

def tool_call_id
  @tool_call_id
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



839
840
841
# File 'lib/cadenya/types.rb', line 839

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



847
848
849
850
851
852
853
# File 'lib/cadenya/types.rb', line 847

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

Instance Method Details

#to_hObject



855
856
857
858
859
860
861
# File 'lib/cadenya/types.rb', line 855

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