Anthropic::CitationsDelta
Inherits JSON::Serializable < Struct < Value < Object
Citations delta - streaming citation
The API returns a variety of citation location types (char, page,
content_block, web_search_result, search_result). This struct keeps the
legacy char-location fields accessible via convenience methods while
retaining the full raw citation payload under citation_data for
non-char-location variants.
Constructors
new(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
citation
Legacy struct-style accessor for char-location citations. Returns nil
when this delta does not carry a char-location citation.
citation_data
Sourcecitation_type
Returns the citation location type (e.g., "char_location", "page_location", "content_block_location", "web_search_result_location", "search_result_location"). Defaults to "char_location" when absent for backwards compatibility.
type
Source