Class: Cadenya::Types::SetToolCallContentRequest_TextBlock

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(text: nil) ⇒ SetToolCallContentRequest_TextBlock

Returns a new instance of SetToolCallContentRequest_TextBlock.



5176
5177
5178
# File 'lib/cadenya/types.rb', line 5176

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

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



5174
5175
5176
# File 'lib/cadenya/types.rb', line 5174

def text
  @text
end

Class Method Details

.from_json(data) ⇒ Object



5180
5181
5182
5183
5184
# File 'lib/cadenya/types.rb', line 5180

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

Instance Method Details

#to_hObject



5186
5187
5188
5189
5190
# File 'lib/cadenya/types.rb', line 5186

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