GPT-3.5 token limit exceeded after adding new user turn
Problem Description Symptoms and Impact During development of a multi‑turn chatbot that uses the OpenAI GPT‑3.5‑turbo model, the API began returning errors after adding a new user turn. Typical log entries looked like: 2024-09-14 10:22:31,842 ERROR openai.error.InvalidRequestError: This model’s maximum context length is 4097 tokens Traceback (most recent call last): File “app.py”, line 112, in … Read more