Class: OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/chat/completion_create_params.rb

Defined Under Namespace

Modules: SearchContextSize Classes: UserLocation

Instance Attribute Summary collapse

Class Method 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(search_context_size: nil, user_location: nil) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions for more details.

This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](platform.openai.com/docs/guides/tools-web-search?api-mode=chat).

Parameters:



# File 'lib/openai/models/chat/completion_create_params.rb', line 612

Instance Attribute Details

#search_context_sizeSymbol, ...

High level guidance for the amount of context window space to use for the search. One of ‘low`, `medium`, or `high`. `medium` is the default.



601
602
# File 'lib/openai/models/chat/completion_create_params.rb', line 601

optional :search_context_size,
enum: -> { OpenAI::Chat::CompletionCreateParams::WebSearchOptions::SearchContextSize }

#user_locationOpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions::UserLocation?

Approximate location parameters for the search.



608
609
610
# File 'lib/openai/models/chat/completion_create_params.rb', line 608

optional :user_location,
-> { OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation },
nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/chat/completion_create_params.rb', line 636