Asked about Making a call
Does max_tokens make the model give shorter answers?
An answer that works
No. It is a hard cut-off, not an instruction. The model writes as though unconstrained and gets chopped mid-word. To get a shorter answer, ask for one in the prompt.
Reading an answer is not being able to give one. The section that teaches this is Making a call, 2 hours of The Messages API.
Learn this properlyAlso asked about The Messages API
What are the roles in a chat request and what is each for?What is stop_reason and why check it?Are LLM APIs stateful or stateless?Why does a long conversation get expensive faster than you would expect?How would you keep a long-running chat affordable?What does temperature do?Is temperature 0 deterministic?How do you make a model give shorter answers?
All 10 questions on The Messages API