Code QuizBeginner

Sending conversation history

Find why the model loses earlier context in a multi-turn chat.

Codepython
history = [
    {"role": "user", "content": "My name is Ada."},
    {"role": "assistant", "content": "Nice to meet you, Ada!"},
]

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

What is the bug in this multi-turn call?