Learning map / Task 1 / Lesson

Spot the bug

Five minutes. This loop runs, and it will cost its owner round trips (requests to the model, each re-reading the whole conversation), a cache (the API's stored copy of a prompt prefix that has not changed, which makes the next request cheaper), and a 400 (an error status: the API rejects the request) on the first failed tool. Five lines are wrong. Click the ones you think are. Marks stay: a wrong click is information too.

    Then

    Open tasks/t01_fewer_tool_calls/worked/v0_naive.py and find which of these it has. It has two. The rest are yours to never write .