Class: Anthropic::Models::Beta::BetaTextBlock

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

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

#initializevoid



22
# File 'sig/anthropic/models/beta/beta_text_block.rbs', line 22

def initialize: (

Instance Attribute Details

#citationsArray<Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation, Anthropic::Models::Beta::BetaCitationSearchResultLocation>?

Citations supporting the text block.

The type of citation returned will depend on the type of document being cited. Citing a PDF results in page_location, plain text results in char_location, and content document results in content_block_location.



15
16
17
# File 'lib/anthropic/models/beta/beta_text_block.rb', line 15

required :citations,
-> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaTextCitation] },
nil?: true

#textString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :text, String

#typeSymbol, :text

Parameters:

  • value (:text)

Returns:

  • (Symbol, :text)


35
# File 'lib/anthropic/models/beta/beta_text_block.rb', line 35

required :type, const: :text

Instance Method Details

#parsedtop

Returns:

  • (top)


18
# File 'sig/anthropic/models/beta/beta_text_block.rbs', line 18

attr_accessor parsed: top

#parsed=void

Parameters:

  • value (top)


18
# File 'sig/anthropic/models/beta/beta_text_block.rbs', line 18

attr_accessor parsed: top

#to_hash{

Returns:

  • ({)


28
# File 'sig/anthropic/models/beta/beta_text_block.rbs', line 28

def to_hash: -> {