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

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

Defined Under Namespace

Classes: Content

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

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 ⇒ Object

Parameters:

  • file_id —

    The ID of the file that result was found in.

  • file_name —

    The name of the file that result was found in.

  • score —

    The score of the result. All values must be a floating point number between 0 and 1.

  • content —

    The content of the result that was found. The content is only included if requested via the include query parameter.



162
# File 'sig/openai/models/beta/threads/runs/file_search_tool_call.rbs', line 162

def initialize: (

Instance Attribute Details

#content ⇒ ::Array[OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content]?

The content of the result that was found. The content is only included if requested via the include query parameter.

Returns:

  • (::Array[OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content], nil)


140
141
142
143
144
145
146
147
# File 'lib/openai/models/beta/threads/runs/file_search_tool_call.rb', line 140

optional(
  :content,
  -> {
    OpenAI::Internal::Type::ArrayOf[
      OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content
    ]
  }
)

#file_id ⇒ String

The ID of the file that result was found in.

Returns:

  • (String)


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

required :file_id, String

#file_name ⇒ String

The name of the file that result was found in.

Returns:

  • (String)


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

required :file_name, String

#score ⇒ Float

The score of the result. All values must be a floating point number between 0 and 1.

Returns:

  • (Float)


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

required :score, Float

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


169
# File 'sig/openai/models/beta/threads/runs/file_search_tool_call.rbs', line 169

def to_hash: -> {