Messages, roles, and the response — the call AI ships every time — step 7 of 9
AI assumed the response had a top-level text field, but Anthropic
returns text nested inside content[0]. The script crashes with a
KeyError. Fix line 11 so it prints the reply.
Expected output:
All tests pass.
The break is on line 11 — but read the whole snippet first.
⌘↵ runs the editor.read, then continue.
AI assumed the response had a top-level text field, but Anthropic
returns text nested inside content[0]. The script crashes with a
KeyError. Fix line 11 so it prints the reply.
Expected output:
All tests pass.
The break is on line 11 — but read the whole snippet first.
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.