Class: OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/threads/runs/file_search_tool_call.rb

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Method Summary collapse

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(text: nil, type: nil) ⇒ Object

Parameters:



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
# File 'lib/openai/models/beta/threads/runs/file_search_tool_call.rb', line 153

class Content < OpenAI::Internal::Type::BaseModel
  # @!attribute text
  #   The text content of the file.
  #
  #   @return [String, nil]
  optional :text, String

  # @!attribute type
  #   The type of the content.
  #
  #   @return [Symbol, OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content::Type, nil]
  optional :type,
           enum: -> {
             OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content::Type
           }

  # @!method initialize(text: nil, type: nil)
  #   @param text [String] The text content of the file.
  #
  #   @param type [Symbol, OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content::Type] The type of the content.

  # The type of the content.
  #
  # @see OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content#type
  module Type
    extend OpenAI::Internal::Type::Enum

    TEXT = :text

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#textString?

The text content of the file.

Returns:

  • (String, nil)


158
# File 'lib/openai/models/beta/threads/runs/file_search_tool_call.rb', line 158

optional :text, String

#typeSymbol, ...

The type of the content.



164
165
166
167
# File 'lib/openai/models/beta/threads/runs/file_search_tool_call.rb', line 164

optional :type,
enum: -> {
  OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content::Type
}