Class: Anthropic::Models::DocumentBlock
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::DocumentBlock
- Defined in:
- lib/anthropic/models/document_block.rb,
sig/anthropic/models/document_block.rbs
Defined Under Namespace
Modules: Source
Instance Attribute Summary collapse
-
#citations ⇒ Anthropic::Models::CitationsConfig?
Citation configuration for the document.
- #source ⇒ Anthropic::Models::Base64PDFSource, Anthropic::Models::PlainTextSource
-
#title ⇒ String?
The title of the document.
- #type ⇒ Symbol, :document
Instance Method Summary collapse
-
#initialize(citations:, source:, title:, type: :document) ⇒ DocumentBlock
constructor
A new instance of DocumentBlock.
- #to_hash ⇒ { citations: Anthropic::CitationsConfig?, source: Anthropic::Models::DocumentBlock::source, title: String?, type: :document }
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) ⇒ DocumentBlock
Returns a new instance of DocumentBlock.
|
|
# File 'lib/anthropic/models/document_block.rb', line 28
|
Instance Attribute Details
#citations ⇒ Anthropic::Models::CitationsConfig?
Citation configuration for the document
10 |
# File 'lib/anthropic/models/document_block.rb', line 10 required :citations, -> { Anthropic::CitationsConfig }, nil?: true |
#source ⇒ Anthropic::Models::Base64PDFSource, Anthropic::Models::PlainTextSource
15 |
# File 'lib/anthropic/models/document_block.rb', line 15 required :source, union: -> { Anthropic::DocumentBlock::Source } |
#title ⇒ String?
The title of the document
21 |
# File 'lib/anthropic/models/document_block.rb', line 21 required :title, String, nil?: true |
#type ⇒ Symbol, :document
26 |
# File 'lib/anthropic/models/document_block.rb', line 26 required :type, const: :document |
Instance Method Details
#to_hash ⇒ { citations: Anthropic::CitationsConfig?, source: Anthropic::Models::DocumentBlock::source, title: String?, type: :document }
27 28 29 30 31 32 |
# File 'sig/anthropic/models/document_block.rbs', line 27
def to_hash: -> {
citations: Anthropic::CitationsConfig?,
source: Anthropic::Models::DocumentBlock::source,
title: String?,
type: :document
}
|