Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle.
The number of last N input tokens used as ngram to search/match
against the previous prompt sequence.
This is equal to the N in N-Gram.
The default value is 3 if not specified.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[],[],null,["# Interface SpeculativeDecodingSpec.NgramSpeculationOrBuilder (1.32.0)\n\n public static interface SpeculativeDecodingSpec.NgramSpeculationOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getNgramSize()\n\n public abstract int getNgramSize()\n\nThe number of last N input tokens used as ngram to search/match\nagainst the previous prompt sequence.\nThis is equal to the N in N-Gram.\nThe default value is 3 if not specified.\n\n`int32 ngram_size = 1;`"]]