Class: Anthropic::Models::TextBlock
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::TextBlock
- Defined in:
- lib/anthropic/models/text_block.rb
Instance Attribute Summary collapse
-
#citations ⇒ Array<Anthropic::Models::CitationCharLocation, Anthropic::Models::CitationPageLocation, Anthropic::Models::CitationContentBlockLocation, Anthropic::Models::CitationsWebSearchResultLocation, Anthropic::Models::CitationsSearchResultLocation>?
Citations supporting the text block.
- #text ⇒ String
- #type ⇒ Symbol, :text
Instance Method Summary collapse
-
#initialize(citations: , text: , type: :text) ⇒ void
constructor
Some parameter documentations has been truncated, see TextBlock for more details.
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: , text: , type: :text) ⇒ void
Some parameter documentations has been truncated, see Anthropic::Models::TextBlock for more details.
|
|
# File 'lib/anthropic/models/text_block.rb', line 30
|
Instance Attribute Details
#citations ⇒ Array<Anthropic::Models::CitationCharLocation, Anthropic::Models::CitationPageLocation, Anthropic::Models::CitationContentBlockLocation, Anthropic::Models::CitationsWebSearchResultLocation, Anthropic::Models::CitationsSearchResultLocation>?
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.
14 15 16 17 18 |
# File 'lib/anthropic/models/text_block.rb', line 14 required :citations, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::TextCitation] }, nil?: true |
#text ⇒ String
23 |
# File 'lib/anthropic/models/text_block.rb', line 23 required :text, String |
#type ⇒ Symbol, :text
28 |
# File 'lib/anthropic/models/text_block.rb', line 28 required :type, const: :text |