Code QuizBeginner

Iterating a streaming response

Find why this streaming loop never streams the output.

Codepython
stream = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Count to 5"}]
)
for chunk in stream:
    print(chunk.choices[0].delta.content, end="")

What is the bug in this code?