A language model gives a score to every token. What happens next is a choice, and the choice rule shapes the text more than most people expect: the same model sounds repetitive, creative or unhinged depending on three numbers.
You will explore the knobs, then write temperature, top-k and top-p yourself.