[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-20 UTC."],[],[],null,["# FirebaseAI Framework Reference\n\nFinishReason\n============\n\n @available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)\n public struct FinishReason : DecodableProtoEnum, Hashable, Sendable\n\nA value enumerating possible reasons for a model to terminate a content generation request.\n- `\n ``\n ``\n `\n\n ### [stop](#/s:10FirebaseAI12FinishReasonV4stopACvpZ)\n\n `\n ` \n Natural stop point of the model or provided stop sequence. \n\n #### Declaration\n\n Swift \n\n public static let stop: FinishReason\n\n- `\n ``\n ``\n `\n\n ### [maxTokens](#/s:10FirebaseAI12FinishReasonV9maxTokensACvpZ)\n\n `\n ` \n The maximum number of tokens as specified in the request was reached. \n\n #### Declaration\n\n Swift \n\n public static let maxTokens: FinishReason\n\n- `\n ``\n ``\n `\n\n ### [safety](#/s:10FirebaseAI12FinishReasonV6safetyACvpZ)\n\n `\n ` \n The token generation was stopped because the response was flagged for safety reasons. \n Note\n\n When streaming, the [content](../Structs/Candidate.html#/s:10FirebaseAI9CandidateV7contentAA12ModelContentVvp) will be empty if content filters blocked the\n output. \n\n #### Declaration\n\n Swift \n\n public static let safety: FinishReason\n\n- `\n ``\n ``\n `\n\n ### [recitation](#/s:10FirebaseAI12FinishReasonV10recitationACvpZ)\n\n `\n ` \n The token generation was stopped because the response was flagged for unauthorized citations. \n\n #### Declaration\n\n Swift \n\n public static let recitation: FinishReason\n\n- `\n ``\n ``\n `\n\n ### [other](#/s:10FirebaseAI12FinishReasonV5otherACvpZ)\n\n `\n ` \n All other reasons that stopped token generation. \n\n #### Declaration\n\n Swift \n\n public static let other: FinishReason\n\n- `\n ``\n ``\n `\n\n ### [blocklist](#/s:10FirebaseAI12FinishReasonV9blocklistACvpZ)\n\n `\n ` \n Token generation was stopped because the response contained forbidden terms. \n\n #### Declaration\n\n Swift \n\n public static let blocklist: FinishReason\n\n- `\n ``\n ``\n `\n\n ### [prohibitedContent](#/s:10FirebaseAI12FinishReasonV17prohibitedContentACvpZ)\n\n `\n ` \n Token generation was stopped because the response contained potentially prohibited content. \n\n #### Declaration\n\n Swift \n\n public static let prohibitedContent: FinishReason\n\n- `\n ``\n ``\n `\n\n ### [spii](#/s:10FirebaseAI12FinishReasonV4spiiACvpZ)\n\n `\n ` \n Token generation was stopped because of Sensitive Personally Identifiable Information (SPII). \n\n #### Declaration\n\n Swift \n\n public static let spii: FinishReason\n\n- `\n ``\n ``\n `\n\n ### [malformedFunctionCall](#/s:10FirebaseAI12FinishReasonV21malformedFunctionCallACvpZ)\n\n `\n ` \n Token generation was stopped because the function call generated by the model was invalid. \n\n #### Declaration\n\n Swift \n\n public static let malformedFunctionCall: FinishReason\n\n- `\n ``\n ``\n `\n\n ### [rawValue](#/s:10FirebaseAI12FinishReasonV8rawValueSSvp)\n\n `\n ` \n Returns the raw string representation of the `FinishReason` value. \n Note\n\n This value directly corresponds to the values in the [REST\n API](https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/GenerateContentResponse#FinishReason). \n\n #### Declaration\n\n Swift \n\n public let rawValue: String"]]