FirebaseVertexAI Framework Reference Stay organized with collections Save and categorize content based on your preferences.
Candidate
@available(iOS15.0,macOS12.0,tvOS15.0,watchOS8.0,*)publicstructCandidate:SendableextensionCandidate:DecodableA struct representing a possible reply to a content generation prompt. Each content generationprompt may produce multiple candidate responses.
The response’s content.
Declaration
Swift
publicletcontent:ModelContentThe safety rating of the response content.
Declaration
Swift
publicletsafetyRatings:[SafetyRating]The reason the model stopped generating content, if it exists; for example, if the modelgenerated a predefined stop sequence.
Declaration
Swift
publicletfinishReason:FinishReason?Cited works in the model’s response content, if it exists.
Declaration
Swift
publicletcitationMetadata:CitationMetadata?Initializer for SwiftUI previews or tests.
Declaration
Swift
publicinit(content:ModelContent,safetyRatings:[SafetyRating],finishReason:FinishReason?,citationMetadata:CitationMetadata?)
Initializes a response from a decoder. Used for decoding server responses; not for publicuse.
Declaration
Swift
publicinit(fromdecoder:Decoder)throws
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 2024-10-21 UTC.