Class: OpenAI::Models::Responses::FileSearchTool::RankingOptions

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

Overview

See Also:

  • OpenAI::Models::Responses::FileSearchTool#ranking_options

Defined Under Namespace

Modules: Ranker Classes: HybridSearch

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(embedding_weight:, text_weight:) ⇒ Object

Parameters:

  • hybrid_search —

    Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

  • ranker —

    The ranker to use for the file search.

  • score_threshold —

    The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.



# File 'lib/openai/models/responses/file_search_tool.rb', line 98

Instance Attribute Details

#hybrid_search ⇒ OpenAI::Responses::FileSearchTool::RankingOptions::HybridSearch?

Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

Returns:

  • (OpenAI::Responses::FileSearchTool::RankingOptions::HybridSearch, nil)


82
# File 'lib/openai/models/responses/file_search_tool.rb', line 82

optional :hybrid_search, -> { OpenAI::Responses::FileSearchTool::RankingOptions::HybridSearch }

#ranker ⇒ OpenAI::Models::Responses::FileSearchTool::RankingOptions::ranker?

The ranker to use for the file search.

Returns:

  • (OpenAI::Models::Responses::FileSearchTool::RankingOptions::ranker, nil)


88
# File 'lib/openai/models/responses/file_search_tool.rb', line 88

optional :ranker, enum: -> { OpenAI::Responses::FileSearchTool::RankingOptions::Ranker }

#score_threshold ⇒ Float?

The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

Returns:

  • (Float, nil)


96
# File 'lib/openai/models/responses/file_search_tool.rb', line 96

optional :score_threshold, Float

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


125
# File 'sig/openai/models/responses/file_search_tool.rbs', line 125

def to_hash: -> {