Module: OpenAI::Models::Beta::WebSearchAction

Extended by:
Internal::Type::Union
Defined in:
lib/openai/models/beta/web_search_action.rb,
sig/openai/models/beta/web_search_action.rbs

Overview

An action performed by the web search tool.

Defined Under Namespace

Classes: FindInPage, OpenPage, Other, Search

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variant_for_dump

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info

Class Method Details

.variants ⇒ Array(OpenAI::Models::Beta::WebSearchAction::Search, OpenAI::Models::Beta::WebSearchAction::OpenPage, OpenAI::Models::Beta::WebSearchAction::FindInPage, OpenAI::Models::Beta::WebSearchAction::Other)



# File 'lib/openai/models/beta/web_search_action.rb', line 125

Instance Method Details

#initialize(pattern:, url:, type: :find_in_page) ⇒ Object

Finds text within a web page.

Parameters:

  • pattern (String, nil) —

    The text pattern that was searched for.

  • url (String, nil) —

    The URL of the page that was searched.

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

    The type of the object. Always find_in_page.



# File 'lib/openai/models/beta/web_search_action.rb', line 43