FirebaseVertexAI Framework Reference

Citation

@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
public struct Citation : Sendable
extension Citation: Decodable

A 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
  • uri

    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

    DateComponents can be converted to a Date using the date computed property.

    Declaration

    Swift

    public let publicationDate: DateComponents?
  • Declaration

    Swift

    public init(from decoder: any Decoder) throws