Class: Anthropic::Models::WebFetchBlock

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/web_fetch_block.rb

Instance Attribute 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(content:, retrieved_at:, url:, type: :web_fetch_result) ⇒ void

Parameters:

  • content (Anthropic::Models::DocumentBlock)
  • retrieved_at (String, nil)

    ISO 8601 timestamp when the content was retrieved

  • url (String)

    Fetched content URL

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


# File 'lib/anthropic/models/web_fetch_block.rb', line 28


Instance Attribute Details

#contentAnthropic::Models::DocumentBlock



9
# File 'lib/anthropic/models/web_fetch_block.rb', line 9

required :content, -> { Anthropic::DocumentBlock }

#retrieved_atString?

ISO 8601 timestamp when the content was retrieved

Returns:

  • (String, nil)


15
# File 'lib/anthropic/models/web_fetch_block.rb', line 15

required :retrieved_at, String, nil?: true

#typeSymbol, :web_fetch_result

Returns:

  • (Symbol, :web_fetch_result)


20
# File 'lib/anthropic/models/web_fetch_block.rb', line 20

required :type, const: :web_fetch_result

#urlString

Fetched content URL

Returns:

  • (String)


26
# File 'lib/anthropic/models/web_fetch_block.rb', line 26

required :url, String