Class: Google::Genai::Types::Part
- Defined in:
- lib/google/genai/types.rb
Instance Attribute Summary collapse
-
#file_data ⇒ Object
Returns the value of attribute file_data.
-
#inline_data ⇒ Object
Returns the value of attribute inline_data.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Google::Genai::Types::Base
Instance Attribute Details
#file_data ⇒ Object
Returns the value of attribute file_data.
33 34 35 |
# File 'lib/google/genai/types.rb', line 33 def file_data @file_data end |
#inline_data ⇒ Object
Returns the value of attribute inline_data.
33 34 35 |
# File 'lib/google/genai/types.rb', line 33 def inline_data @inline_data end |
#text ⇒ Object
Returns the value of attribute text.
33 34 35 |
# File 'lib/google/genai/types.rb', line 33 def text @text end |
Instance Method Details
#to_h ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/google/genai/types.rb', line 35 def to_h data = {} data[:text] = text if text data[:inlineData] = inline_data.to_h if inline_data data[:fileData] = file_data.to_h if file_data data end |