Class: Telnyx::Models::AI::ChatCompletionRequest::Message
Defined Under Namespace
Modules: Content, Role
Instance Attribute Summary collapse
Instance Method Summary
collapse
==, #==, #[], 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
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(content:, role:) ⇒ Object
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
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
|
# File 'lib/telnyx/models/ai/chat_completion_request.rb', line 292
class Message < Telnyx::Internal::Type::BaseModel
required :content, union: -> { Telnyx::AI::ChatCompletionRequest::Message::Content }
required :role, enum: -> { Telnyx::AI::ChatCompletionRequest::Message::Role }
module Content
extend Telnyx::Internal::Type::Union
variant String
variant -> { Telnyx::Models::AI::ChatCompletionRequest::Message::Content::TextAndImage2DArray }
class TextAndImageArray < Telnyx::Internal::Type::BaseModel
required :type, enum: -> { Telnyx::AI::ChatCompletionRequest::Message::Content::TextAndImageArray::Type }
optional :image_url, String
optional :text, String
module Type
extend Telnyx::Internal::Type::Enum
TEXT = :text
IMAGE_URL = :image_url
end
end
TextAndImage2DArray =
Telnyx::Internal::Type::ArrayOf[-> {
Telnyx::AI::ChatCompletionRequest::Message::Content::TextAndImageArray
}]
end
module Role
extend Telnyx::Internal::Type::Enum
SYSTEM = :system
USER = :user
ASSISTANT = :assistant
TOOL = :tool
end
end
|
Instance Attribute Details
296
|
# File 'lib/telnyx/models/ai/chat_completion_request.rb', line 296
required :content, union: -> { Telnyx::AI::ChatCompletionRequest::Message::Content }
|
301
|
# File 'lib/telnyx/models/ai/chat_completion_request.rb', line 301
required :role, enum: -> { Telnyx::AI::ChatCompletionRequest::Message::Role }
|
Instance Method Details
#to_hash ⇒ {
253
|
# File 'sig/telnyx/models/ai/chat_completion_request.rbs', line 253
def to_hash: -> {
|