GoodMem
ReferenceClient SDKsJava SDKModels

LLMSamplingParams Model

LLMSamplingParams Model documentation for Java SDK

LLMSamplingParams

Sampling and generation parameters for controlling LLM text output

Properties

NameTypeDescriptionNotes
maxTokensIntegerMaximum tokens to generate (>0 if set; provider-dependent limits apply)[optional]
temperatureFloatSampling temperature 0.0-2.0 (0.0=deterministic, 2.0=highly random)[optional]
topPFloatNucleus sampling threshold 0.0-1.0 (smaller values focus on higher probability tokens)[optional]
topKIntegerTop-k sampling limit (>0 if set; primarily for local/open-source models)[optional]
frequencyPenaltyFloatFrequency penalty -2.0 to 2.0 (positive values reduce repetition based on frequency)[optional]
presencePenaltyFloatPresence penalty -2.0 to 2.0 (positive values encourage topic diversity)[optional]
stopSequencesList<String>Generation stop sequences (≤10 sequences; each ≤100 chars; generation halts on exact match)[optional]