Module: Anthropic::Models::Beta::BetaManagedAgentsWebFetchURLSourceToolFilter

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

Overview

Which tools' results contribute URLs that may be fetched.

Defined Under Namespace

Modules: Type

Class Method Summary collapse

Methods included from Internal::Type::Union

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

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, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Class Method Details

.new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceAll .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceNone .new(type:, tools:) ⇒ Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceOnly .new(type:, tools:) ⇒ Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceExcept .new(type:, tools:) ⇒ Anthropic::Models::Beta::beta_managed_agents_web_fetch_url_source_tool_filter

Creates a new instance of the variant class whose type matches the given value, passing the remaining arguments to its constructor.

Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaManagedAgentsWebFetchURLSourceToolFilter for more details.

Overloads:

  • .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceAll

    Parameters:

    • type: (:all, "all")

    Returns:

    • (Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceAll)
  • .new(type:) ⇒ Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceNone

    Parameters:

    • type: (:none, "none")

    Returns:

    • (Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceNone)
  • .new(type:, tools:) ⇒ Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceOnly

    Parameters:

    • type: (:only, "only")
    • tools: (::Array[Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceToolReference])

    Returns:

    • (Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceOnly)
  • .new(type:, tools:) ⇒ Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceExcept

    Parameters:

    • type: (:except, "except")
    • tools: (::Array[Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceToolReference])

    Returns:

    • (Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceExcept)
  • .new(type:, tools:) ⇒ Anthropic::Models::Beta::beta_managed_agents_web_fetch_url_source_tool_filter

    Parameters:

    • type: (Anthropic::Models::Beta::BetaManagedAgentsWebFetchURLSourceToolFilter::type_, String)
    • tools: (::Array[Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceToolReference])

    Returns:

    • (Anthropic::Models::Beta::beta_managed_agents_web_fetch_url_source_tool_filter)

Parameters:

Returns:

Raises:

  • (ArgumentError)


54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/anthropic/models/beta/beta_managed_agents_web_fetch_url_source_tool_filter.rb', line 54

def self.new(type:, **args)
  case type.to_sym
  when :all
    Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceAll.new(**args)
  when :none
    Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceNone.new(**args)
  when :only
    Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceOnly.new(**args)
  when :except
    Anthropic::Beta::BetaManagedAgentsWebFetchURLSourceExcept.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/beta_managed_agents_web_fetch_url_source_tool_filter.rb', line 32

.variants ⇒ Array(Anthropic::Models::Beta::BetaManagedAgentsWebFetchURLSourceAll, Anthropic::Models::Beta::BetaManagedAgentsWebFetchURLSourceNone, Anthropic::Models::Beta::BetaManagedAgentsWebFetchURLSourceOnly, Anthropic::Models::Beta::BetaManagedAgentsWebFetchURLSourceExcept)



# File 'lib/anthropic/models/beta/beta_managed_agents_web_fetch_url_source_tool_filter.rb', line 36