Class: OpenAI::Models::Beta::Threads::Message::Attachment
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::Threads::Message::Attachment
- Defined in:
- lib/openai/models/beta/threads/message.rb,
sig/openai/models/beta/threads/message.rbs
Defined Under Namespace
Modules: Tool
Instance Attribute Summary collapse
-
#file_id ⇒ String?
The ID of the file to attach to the message.
-
#tools ⇒ ::Array[OpenAI::Models::Beta::Threads::Message::Attachment::tool]?
The tools to add this file to.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
- #initialize(id:, assistant_id:, attachments:, completed_at:, content:, created_at:, incomplete_at:, incomplete_details:, metadata:, role:, run_id:, status:, thread_id:, object: :"thread.message") ⇒ Object constructor
- #to_hash ⇒ {
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_with_error, 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(id:, assistant_id:, attachments:, completed_at:, content:, created_at:, incomplete_at:, incomplete_details:, metadata:, role:, run_id:, status:, thread_id:, object: :"thread.message") ⇒ Object
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/openai/models/beta/threads/message.rb', line 164 class Attachment < OpenAI::Internal::Type::BaseModel # @!attribute file_id # The ID of the file to attach to the message. # # @return [String, nil] optional :file_id, String # @!attribute tools # The tools to add this file to. # # @return [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::Message::Attachment::Tool::AssistantToolsFileSearchTypeOnly>, nil] optional( :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::Message::Attachment::Tool] } ) # @!method initialize(file_id: nil, tools: nil) # @param file_id [String] # The ID of the file to attach to the message. # # @param tools [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::Message::Attachment::Tool::AssistantToolsFileSearchTypeOnly>] # The tools to add this file to. module Tool extend OpenAI::Internal::Type::Union variant -> { OpenAI::Beta::CodeInterpreterTool } variant -> { OpenAI::Beta::Threads::Message::Attachment::Tool::AssistantToolsFileSearchTypeOnly } class AssistantToolsFileSearchTypeOnly < OpenAI::Internal::Type::BaseModel # @!attribute type # The type of tool being defined: `file_search` # # @return [Symbol, :file_search] required :type, const: :file_search # @!method initialize(type: :file_search) # @param type [Symbol, :file_search] # The type of tool being defined: `file_search` end # @!method self.variants # @return [Array(OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::Message::Attachment::Tool::AssistantToolsFileSearchTypeOnly)] end end |
Instance Attribute Details
#file_id ⇒ String?
The ID of the file to attach to the message.
169 |
# File 'lib/openai/models/beta/threads/message.rb', line 169 optional :file_id, String |
Instance Method Details
#to_hash ⇒ {
180 |
# File 'sig/openai/models/beta/threads/message.rbs', line 180
def to_hash: -> {
|