openai.error.InvalidRequestError: This model's maximum context length is 4097 tokens
I got the same error message today. It suggested the following.  

InvalidRequestError: This model's maximum context length is 4097 tokens. However, you requested 4245 tokens (1745 in the messages, 2500 in the completion). Please reduce the length of the messages or completion.  Clearly I will need a text request or response clipping approach to reduce seeing this error. It was preceded by this warning - openai.py:608: UserWarning: You are trying to use a chat model. This way of initializing it **is no longer supported.** Instead, please use: `from langchain.chat_models import ChatOpenAI`
  warnings.warn(. _ I will check and see if calling using this new style performs better and report back
When using the chat application, I encountered an error message stating "openai.error.InvalidRequestError: This model's maximum context length is 4097 tokens" when I asked a question like "Did he mention Stephen Breyer?". 
![image](https://user-images.githubusercontent.com/25929712/226149401-8de39f47-6cd6-4ba4-9a74-f1a1eb389779.png)
