Class: OpenAI::Models::Chat::ChatCompletionStoreMessage
- Inherits:
-
ChatCompletionMessage
- Object
- Internal::Type::BaseModel
- ChatCompletionMessage
- OpenAI::Models::Chat::ChatCompletionStoreMessage
- Defined in:
- lib/openai/models/chat/chat_completion_store_message.rb,
sig/openai/models/chat/chat_completion_store_message.rbs
Defined Under Namespace
Modules: ContentPart
Instance Attribute Summary collapse
-
#content_parts ⇒ ::Array[OpenAI::Models::Chat::ChatCompletionStoreMessage::content_part]?
If a content parts array was provided, this is an array of
textandimage_urlparts. -
#id ⇒ String
The identifier of the chat message.
Attributes inherited from ChatCompletionMessage
#annotations, #audio, #content, #function_call, #refusal, #role, #tool_calls
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(content:, refusal:, id:, annotations: nil, audio: nil, function_call: nil, tool_calls: nil, content_parts: nil, role: :assistant) ⇒ ChatCompletionStoreMessage
constructor
A new instance of ChatCompletionStoreMessage.
- #to_hash ⇒ { content: String?, refusal: String?, id: String, ?role: :assistant, ?annotations: ::Array[OpenAI::Chat::ChatCompletionMessage::Annotation], ?audio: OpenAI::Chat::ChatCompletionAudio?, ?function_call: OpenAI::Chat::ChatCompletionMessage::FunctionCall, ?tool_calls: ::Array[OpenAI::Models::Chat::chat_completion_message_tool_call], ?content_parts: ::Array[OpenAI::Models::Chat::ChatCompletionStoreMessage::content_part]? }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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:, refusal:, id:, annotations: nil, audio: nil, function_call: nil, tool_calls: nil, content_parts: nil, role: :assistant) ⇒ ChatCompletionStoreMessage
Returns a new instance of ChatCompletionStoreMessage.
|
|
# File 'lib/openai/models/chat/chat_completion_store_message.rb', line 26
|
Instance Attribute Details
#content_parts ⇒ ::Array[OpenAI::Models::Chat::ChatCompletionStoreMessage::content_part]?
If a content parts array was provided, this is an array of text and
image_url parts. Otherwise, null.
18 19 20 21 22 23 24 |
# File 'lib/openai/models/chat/chat_completion_store_message.rb', line 18 optional( :content_parts, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Chat::ChatCompletionStoreMessage::ContentPart] }, nil?: true ) |
#id ⇒ String
The identifier of the chat message.
11 |
# File 'lib/openai/models/chat/chat_completion_store_message.rb', line 11 required :id, String |
Instance Method Details
#to_hash ⇒ { content: String?, refusal: String?, id: String, ?role: :assistant, ?annotations: ::Array[OpenAI::Chat::ChatCompletionMessage::Annotation], ?audio: OpenAI::Chat::ChatCompletionAudio?, ?function_call: OpenAI::Chat::ChatCompletionMessage::FunctionCall, ?tool_calls: ::Array[OpenAI::Models::Chat::chat_completion_message_tool_call], ?content_parts: ::Array[OpenAI::Models::Chat::ChatCompletionStoreMessage::content_part]? }
71 72 73 74 75 76 77 78 79 80 81 |
# File 'sig/openai/models/chat/chat_completion_store_message.rbs', line 71
def to_hash: -> {
content: String?,
refusal: String?,
id: String,
?role: :assistant,
?annotations: ::Array[OpenAI::Chat::ChatCompletionMessage::Annotation],
?audio: OpenAI::Chat::ChatCompletionAudio?,
?function_call: OpenAI::Chat::ChatCompletionMessage::FunctionCall,
?tool_calls: ::Array[OpenAI::Models::Chat::chat_completion_message_tool_call],
?content_parts: ::Array[OpenAI::Models::Chat::ChatCompletionStoreMessage::content_part]?
}
|