Citation

classCitation


This class is deprecated.
The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk

Represents a citation of content from an external source within the model's output.

When the language model generates text that includes content from another source, it should provide a citation to properly attribute the original source. This class encapsulates the metadata associated with that citation.

Summary

Public properties

Int

The (exclusive) ending index within the model output where the cited content ends.

String?

The license under which the cited content is distributed under, if available.

Calendar?

The date of publication of the cited source, if available.

Int

The (inclusive) starting index within the model output where the cited content begins.

String?

The title of the cited source, if available.

String?

The URI of the cited source, if available.

Public properties

endIndex

val endIndexInt

The (exclusive) ending index within the model output where the cited content ends.

license

val licenseString?

The license under which the cited content is distributed under, if available.

publicationDate

val publicationDateCalendar?

The date of publication of the cited source, if available.

startIndex

val startIndexInt

The (inclusive) starting index within the model output where the cited content begins.

title

val titleString?

The title of the cited source, if available.

uri

val uriString?

The URI of the cited source, if available.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.