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
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::CodeInterpreterTool, OpenAI::Models::Beta::Threads::Message::Attachment::Tool::AssistantToolsFileSearchTypeOnly>?
The tools to add this file to.
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
Some parameter documentations has been truncated, see OpenAI::Models::Beta::Threads::Message for more details.
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, 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
Some parameter documentations has been truncated, see OpenAI::Models::Beta::Threads::Message for more details.
Represents a message within a [thread](platform.openai.com/docs/api-reference/threads).
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 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 |
# File 'lib/openai/models/beta/threads/message.rb', line 144 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.
149 |
# File 'lib/openai/models/beta/threads/message.rb', line 149 optional :file_id, String |
#tools ⇒ Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::Message::Attachment::Tool::AssistantToolsFileSearchTypeOnly>?
The tools to add this file to.
155 156 157 158 |
# File 'lib/openai/models/beta/threads/message.rb', line 155 optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::Message::Attachment::Tool] } |