- Glossary
- max_tokens
Glossary term
max_tokens
The required request field that caps how many tokens the model may generate in its reply.
Open lesson 6.3
Stop sequences and max_tokens · Chapter 6, and 1 more lesson below
In plain words
If the reply hits the cap, stop_reason is "max_tokens" and the answer is incomplete.
Taught in
Also in these lessons
Context windowPrefillingStop sequenceStructured outputsToken countingTool usetool_use block