struct

Anthropic::Citation

Inherits JSON::Serializable < Struct < Value < Object

Citation for a character range within a cited document.

This is the legacy char-location citation struct. It remains the canonical representation for start_char_index/end_char_index citations. For other location types (page, content block, web search result, search result), see the dedicated citation structs and the CitationRef union.

Constructors

new(start_char_index : Int32, end_char_index : Int32, document_title : String | Nil = nil, document_index : Int32 | Nil = nil, cited_text : String | Nil = nil, file_id : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

cited_text
Source
document_index
Source
document_title
Source
end_char

DEPRECATED Use #end_char_index instead

Source
end_char_index
Source
file_id
Source
start_char

DEPRECATED Use #start_char_index instead

Source
start_char_index
Source
type
Source