Class: Anthropic::Models::CitationContentBlockLocation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/citation_content_block_location.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(cited_text:, document_index:, document_title:, end_block_index:, file_id:, start_block_index:, type: :content_block_location) ⇒ Object

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

Parameters:

  • cited_text (String)

    The full text of the cited block range, concatenated.

  • document_index (Integer)
  • document_title (String, nil)
  • end_block_index (Integer)

    Exclusive 0-based end index of the cited block range in the source’s ‘content` a

  • file_id (String, nil)
  • start_block_index (Integer)

    0-based index of the first cited block in the source’s ‘content` array.

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


# File 'lib/anthropic/models/citation_content_block_location.rb', line 53

Instance Attribute Details

#cited_textString

The full text of the cited block range, concatenated.

Always equals the contents of ‘content` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.

Returns:

  • (String)


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

required :cited_text, String

#document_indexInteger

Returns:

  • (Integer)


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

required :document_index, Integer

#document_titleString?

Returns:

  • (String, nil)


25
# File 'lib/anthropic/models/citation_content_block_location.rb', line 25

required :document_title, String, nil?: true

#end_block_indexInteger

Exclusive 0-based end index of the cited block range in the source’s ‘content` array.

Always greater than ‘start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`.

Returns:

  • (Integer)


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

required :end_block_index, Integer

#file_idString?

Returns:

  • (String, nil)


40
# File 'lib/anthropic/models/citation_content_block_location.rb', line 40

required :file_id, String, nil?: true

#start_block_indexInteger

0-based index of the first cited block in the source’s ‘content` array.

Returns:

  • (Integer)


46
# File 'lib/anthropic/models/citation_content_block_location.rb', line 46

required :start_block_index, Integer

#typeSymbol, :content_block_location

Returns:

  • (Symbol, :content_block_location)


51
# File 'lib/anthropic/models/citation_content_block_location.rb', line 51

required :type, const: :content_block_location