Citation
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
public struct Citation : Sendable, Equatableextension Citation: DecodableA struct describing a source attribution.
-
The inclusive beginning of a sequence in a model response that derives from a cited source.
Declaration
Swift
public let startIndex: Int -
The exclusive end of a sequence in a model response that derives from a cited source.
Declaration
Swift
public let endIndex: Int -
A link to the cited source, if available.
Declaration
Swift
public let uri: String? -
The title of the cited source, if available.
Declaration
Swift
public let title: String? -
The license the cited source work is distributed under, if specified.
Declaration
Swift
public let license: String? -
The publication date of the cited source, if available.
Tip
DateComponentscan be converted to aDateusing thedatecomputed property.Declaration
Swift
public let publicationDate: DateComponents?
-
Declaration
Swift
public init(from decoder: any Decoder) throws