Class: OpenAI::Models::Chat::ChatCompletionContentPartText
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Chat::ChatCompletionContentPartText
- Defined in:
- lib/openai/models/chat/chat_completion_content_part_text.rb,
sig/openai/models/chat/chat_completion_content_part_text.rbs
Instance Attribute Summary collapse
-
#text ⇒ String
The text content.
-
#type ⇒ Symbol, :text
The type of the content part.
Instance Method Summary collapse
-
#initialize ⇒ ChatCompletionContentPartText
constructor
A new instance of ChatCompletionContentPartText.
- #to_hash ⇒ { text: String, type: :text }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize ⇒ ChatCompletionContentPartText
Returns a new instance of ChatCompletionContentPartText.
13 |
# File 'sig/openai/models/chat/chat_completion_content_part_text.rbs', line 13
def initialize: (text: String, ?type: :text) -> void
|
Instance Attribute Details
#text ⇒ String
The text content.
11 |
# File 'lib/openai/models/chat/chat_completion_content_part_text.rb', line 11 required :text, String |
#type ⇒ Symbol, :text
The type of the content part.
17 |
# File 'lib/openai/models/chat/chat_completion_content_part_text.rb', line 17 required :type, const: :text |
Instance Method Details
#to_hash ⇒ { text: String, type: :text }
15 |
# File 'sig/openai/models/chat/chat_completion_content_part_text.rbs', line 15
def to_hash: -> { text: String, type: :text }
|