Class: OpenAI::Models::Beta::BetaResponseFunctionWebSearch

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

Defined Under Namespace

Modules: Action, Status Classes: Agent

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, 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(pattern:, url:, type: :find_in_page) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Action::FindInPage for more details.

Action type "find_in_page": Searches for a pattern within a loaded page.

Parameters:

  • pattern (String)

    The pattern or text to search for within the page.

  • url (String)

    The URL of the page searched for the pattern.

  • type (Symbol, :find_in_page) (defaults to: :find_in_page)

    The action type.



# File 'lib/openai/models/beta/beta_response_function_web_search.rb', line 38

Instance Attribute Details

#actionOpenAI::Models::Beta::BetaResponseFunctionWebSearch::Action::Search, ...

An object describing the specific action taken in this web search call. Includes details on how the model used the web (search, open_page, find_in_page).



18
# File 'lib/openai/models/beta/beta_response_function_web_search.rb', line 18

required :action, union: -> { OpenAI::Beta::BetaResponseFunctionWebSearch::Action }

#agentOpenAI::Models::Beta::BetaResponseFunctionWebSearch::Agent?

The agent that produced this item.

Parameters:

  • value (OpenAI::Beta::BetaResponseFunctionWebSearch::Agent, nil)

Returns:



36
# File 'lib/openai/models/beta/beta_response_function_web_search.rb', line 36

optional :agent, -> { OpenAI::Beta::BetaResponseFunctionWebSearch::Agent }, nil?: true

#idString

The unique ID of the web search tool call.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/openai/models/beta/beta_response_function_web_search.rb', line 11

required :id, String

#statusSymbol, OpenAI::Models::Beta::BetaResponseFunctionWebSearch::Status

The status of the web search tool call.

Parameters:

  • value (OpenAI::Models::Beta::BetaResponseFunctionWebSearch::status)

Returns:



24
# File 'lib/openai/models/beta/beta_response_function_web_search.rb', line 24

required :status, enum: -> { OpenAI::Beta::BetaResponseFunctionWebSearch::Status }

#typeSymbol, :web_search_call

The type of the web search tool call. Always web_search_call.

Parameters:

  • value (:web_search_call)

Returns:

  • (Symbol, :web_search_call)


30
# File 'lib/openai/models/beta/beta_response_function_web_search.rb', line 30

required :type, const: :web_search_call

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_response_function_web_search.rb', line 216

Instance Method Details

#to_hash{

Returns:

  • ({)


34
# File 'sig/openai/models/beta/beta_response_function_web_search.rbs', line 34

def to_hash: -> {