Class: Anthropic::Models::CitationsSearchResultLocation
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::CitationsSearchResultLocation
- Defined in:
- lib/anthropic/models/citations_search_result_location.rb,
sig/anthropic/models/citations_search_result_location.rbs
Instance Attribute Summary collapse
-
#cited_text ⇒ String
The full text of the cited block range, concatenated.
-
#end_block_index ⇒ Integer
Exclusive 0-based end index of the cited block range in the source's
contentarray. -
#search_result_index ⇒ Integer
0-based index of the cited search result among all
search_resultcontent blocks in the request, in the order they appear across messages and tool results. - #source ⇒ String
-
#start_block_index ⇒ Integer
0-based index of the first cited block in the source's
contentarray. - #title ⇒ String?
- #type ⇒ Symbol, :search_result_location
Instance Method Summary collapse
-
#initialize(cited_text:, end_block_index:, search_result_index:, source:, start_block_index:, title:, type: :search_result_location) ⇒ Object
constructor
Some parameter documentations has been truncated, see CitationsSearchResultLocation for more details.
- #to_hash ⇒ {
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:, end_block_index:, search_result_index:, source:, start_block_index:, title:, type: :search_result_location) ⇒ Object
Some parameter documentations has been truncated, see Anthropic::Models::CitationsSearchResultLocation for more details.
|
|
# File 'lib/anthropic/models/citations_search_result_location.rb', line 59
|
Instance Attribute Details
#cited_text ⇒ String
The full text of the cited block range, concatenated.
Always equals the contents of content[start_block_index:end_block_index]
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.
15 |
# File 'lib/anthropic/models/citations_search_result_location.rb', line 15 required :cited_text, String |
#end_block_index ⇒ Integer
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.
25 |
# File 'lib/anthropic/models/citations_search_result_location.rb', line 25 required :end_block_index, Integer |
#search_result_index ⇒ Integer
0-based index of the cited search result among all search_result content
blocks in the request, in the order they appear across messages and tool
results.
Counted separately from document_index; server-side web search results are not
included in this count.
36 |
# File 'lib/anthropic/models/citations_search_result_location.rb', line 36 required :search_result_index, Integer |
#source ⇒ String
41 |
# File 'lib/anthropic/models/citations_search_result_location.rb', line 41 required :source, String |
#start_block_index ⇒ Integer
0-based index of the first cited block in the source's content array.
47 |
# File 'lib/anthropic/models/citations_search_result_location.rb', line 47 required :start_block_index, Integer |
#title ⇒ String?
52 |
# File 'lib/anthropic/models/citations_search_result_location.rb', line 52 required :title, String, nil?: true |
#type ⇒ Symbol, :search_result_location
57 |
# File 'lib/anthropic/models/citations_search_result_location.rb', line 57 required :type, const: :search_result_location |
Instance Method Details
#to_hash ⇒ {
39 |
# File 'sig/anthropic/models/citations_search_result_location.rbs', line 39
def to_hash: -> {
|