API basics · Question 10 of 12

The code only reads the answer text and ignores the stop reason delivered with it (e.g. "stop_reason" / "finish_reason"). What problem can this cause?

1 answer is correct. Medium Created with AI

Show answer

Answer

  • B Truncated answers or tool requests are wrongly treated as finished

Explanation

The stop reason says why the model stopped: finished normally, length limit reached, tool requested or refused. Ignoring it means showing half sentences or forgetting to run a tool.

Certifications & exams

Which exam comes next?

You can already practise for 60 exams, and 7 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications