llm apis — talking to claude and openai6 / 9
messages, roles, and the response — the call ai ships every time
Claude wrote this and passed messages as a single dict instead of a
list of dicts. The real API would 400 this request. Fix line 1 so
messages is a list containing the one user turn, then the loop
prints the content.
Expected output:
Hello, model.
The break is on line 1 — but read the whole snippet first.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _