Class: Cadenya::Types::ObjectiveToolCallResult_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) ⇒ ObjectiveToolCallResult_TextBlock

Returns a new instance of ObjectiveToolCallResult_TextBlock.



4285
4286
4287
# File 'lib/cadenya/types.rb', line 4285

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

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



4283
4284
4285
# File 'lib/cadenya/types.rb', line 4283

def text
  @text
end

Class Method Details

.from_json(data) ⇒ Object



4289
4290
4291
4292
4293
# File 'lib/cadenya/types.rb', line 4289

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

Instance Method Details

#to_hObject



4295
4296
4297
4298
4299
# File 'lib/cadenya/types.rb', line 4295

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