Class: OpenAI::Models::Responses::ResponseFileSearchToolCall::Result

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/response_file_search_tool_call.rb,
sig/openai/models/responses/response_file_search_tool_call.rbs

Defined Under Namespace

Modules: Attribute

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:

  • attributes —

    Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

  • file_id —

    The unique ID of the file.

  • filename —

    The name of the file.

  • score —

    The relevance score of the file - a value between 0 and 1.

  • text —

    The text that was retrieved from the file.



127
# File 'sig/openai/models/responses/response_file_search_tool_call.rbs', line 127

def initialize: (

Instance Attribute Details

#attributes ⇒ ::Hash[Symbol, OpenAI::Models::Responses::ResponseFileSearchToolCall::Result::attribute]?

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

Returns:

  • (::Hash[Symbol, OpenAI::Models::Responses::ResponseFileSearchToolCall::Result::attribute], nil)


91
92
93
94
95
96
97
# File 'lib/openai/models/responses/response_file_search_tool_call.rb', line 91

optional(
  :attributes,
  -> {
    OpenAI::Internal::Type::HashOf[union: OpenAI::Responses::ResponseFileSearchToolCall::Result::Attribute]
  },
  nil?: true
)

#file_id ⇒ String?

The unique ID of the file.

Returns:

  • (String, nil)


103
# File 'lib/openai/models/responses/response_file_search_tool_call.rb', line 103

optional :file_id, String

#filename ⇒ String?

The name of the file.

Returns:

  • (String, nil)


109
# File 'lib/openai/models/responses/response_file_search_tool_call.rb', line 109

optional :filename, String

#score ⇒ Float?

The relevance score of the file - a value between 0 and 1.

Returns:

  • (Float, nil)


115
# File 'lib/openai/models/responses/response_file_search_tool_call.rb', line 115

optional :score, Float

#text ⇒ String?

The text that was retrieved from the file.

Returns:

  • (String, nil)


121
# File 'lib/openai/models/responses/response_file_search_tool_call.rb', line 121

optional :text, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


135
# File 'sig/openai/models/responses/response_file_search_tool_call.rbs', line 135

def to_hash: -> {