Code QuizBeginner

Passing conversation history

Find why the assistant loses previous multi-turn context.

Codepython
messages = [{"role": "user", "content": "My name is Sam."}]
resp = client.chat.completions.create(model="gpt-4o-mini", messages=messages)

messages = [{"role": "user", "content": "What is my name?"}]
resp = client.chat.completions.create(model="gpt-4o-mini", messages=messages)

What is the bug in this code?