Candidate

classCandidate


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

ACandidate represents a single response generated by the model for a given request.

Summary

Public properties

CitationMetadata?

Metadata about the sources used to generate this content.

Content

The actual content generated by the model.

FinishReason?

The reason the model stopped generating content, if it exist.

List<SafetyRating>

A list ofSafetyRatings describing the generated content.

Public properties

citationMetadata

val citationMetadataCitationMetadata?

Metadata about the sources used to generate this content.

content

val contentContent

The actual content generated by the model.

finishReason

val finishReasonFinishReason?

The reason the model stopped generating content, if it exist.

safetyRatings

val safetyRatingsList<SafetyRating>

A list ofSafetyRatings describing the generated content.

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.