Class: Telnyx::Models::AI::ChatCreateCompletionParams::Message
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Telnyx::Models::AI::ChatCreateCompletionParams::Message
- Defined in:
- lib/telnyx/models/ai/chat_create_completion_params.rb
Defined Under Namespace
Instance Attribute Summary collapse
- #content ⇒ String, Array<Telnyx::Models::AI::ChatCreateCompletionParams::Message::Content::TextAndImageArray>
- #role ⇒ Symbol, Telnyx::Models::AI::ChatCreateCompletionParams::Message::Role
Instance Method Summary collapse
- #initialize(content:, role:) ⇒ Object constructor
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(content:, role:) ⇒ Object
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/telnyx/models/ai/chat_create_completion_params.rb', line 254 class Message < Telnyx::Internal::Type::BaseModel # @!attribute content # # @return [String, Array<Telnyx::Models::AI::ChatCreateCompletionParams::Message::Content::TextAndImageArray>] required :content, union: -> { Telnyx::AI::ChatCreateCompletionParams::Message::Content } # @!attribute role # # @return [Symbol, Telnyx::Models::AI::ChatCreateCompletionParams::Message::Role] required :role, enum: -> { Telnyx::AI::ChatCreateCompletionParams::Message::Role } # @!method initialize(content:, role:) # @param content [String, Array<Telnyx::Models::AI::ChatCreateCompletionParams::Message::Content::TextAndImageArray>] # @param role [Symbol, Telnyx::Models::AI::ChatCreateCompletionParams::Message::Role] # @see Telnyx::Models::AI::ChatCreateCompletionParams::Message#content module Content extend Telnyx::Internal::Type::Union variant String variant -> { Telnyx::Models::AI::ChatCreateCompletionParams::Message::Content::TextAndImage2DArray } class TextAndImageArray < Telnyx::Internal::Type::BaseModel # @!attribute type # # @return [Symbol, Telnyx::Models::AI::ChatCreateCompletionParams::Message::Content::TextAndImageArray::Type] required :type, enum: -> { Telnyx::AI::ChatCreateCompletionParams::Message::Content::TextAndImageArray::Type } # @!attribute image_url # # @return [String, nil] optional :image_url, String # @!attribute text # # @return [String, nil] optional :text, String # @!method initialize(type:, image_url: nil, text: nil) # @param type [Symbol, Telnyx::Models::AI::ChatCreateCompletionParams::Message::Content::TextAndImageArray::Type] # @param image_url [String] # @param text [String] # @see Telnyx::Models::AI::ChatCreateCompletionParams::Message::Content::TextAndImageArray#type module Type extend Telnyx::Internal::Type::Enum TEXT = :text IMAGE_URL = :image_url # @!method self.values # @return [Array<Symbol>] end end # @!method self.variants # @return [Array(String, Array<Telnyx::Models::AI::ChatCreateCompletionParams::Message::Content::TextAndImageArray>)] # @type [Telnyx::Internal::Type::Converter] TextAndImage2DArray = Telnyx::Internal::Type::ArrayOf[-> { Telnyx::AI::ChatCreateCompletionParams::Message::Content::TextAndImageArray }] end # @see Telnyx::Models::AI::ChatCreateCompletionParams::Message#role module Role extend Telnyx::Internal::Type::Enum SYSTEM = :system USER = :user ASSISTANT = :assistant TOOL = :tool # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#content ⇒ String, Array<Telnyx::Models::AI::ChatCreateCompletionParams::Message::Content::TextAndImageArray>
258 |
# File 'lib/telnyx/models/ai/chat_create_completion_params.rb', line 258 required :content, union: -> { Telnyx::AI::ChatCreateCompletionParams::Message::Content } |
#role ⇒ Symbol, Telnyx::Models::AI::ChatCreateCompletionParams::Message::Role
263 |
# File 'lib/telnyx/models/ai/chat_create_completion_params.rb', line 263 required :role, enum: -> { Telnyx::AI::ChatCreateCompletionParams::Message::Role } |