Class: Anthropic::Models::Beta::BetaDocumentBlock

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

Defined Under Namespace

Modules: Source

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(citations: , source: , title: , type: :document) ⇒ Object

Parameters:



# File 'lib/anthropic/models/beta/beta_document_block.rb', line 29

Instance Attribute Details

#citationsAnthropic::Models::Beta::BetaCitationConfig?

Citation configuration for the document



11
# File 'lib/anthropic/models/beta/beta_document_block.rb', line 11

required :citations, -> { Anthropic::Beta::BetaCitationConfig }, nil?: true

#sourceAnthropic::Models::Beta::BetaBase64PDFSource, Anthropic::Models::Beta::BetaPlainTextSource



16
# File 'lib/anthropic/models/beta/beta_document_block.rb', line 16

required :source, union: -> { Anthropic::Beta::BetaDocumentBlock::Source }

#titleString?

The title of the document

Returns:

  • (String, nil)


22
# File 'lib/anthropic/models/beta/beta_document_block.rb', line 22

required :title, String, nil?: true

#typeSymbol, :document

Returns:

  • (Symbol, :document)


27
# File 'lib/anthropic/models/beta/beta_document_block.rb', line 27

required :type, const: :document