Hello, I’m reposting an issue I opened yesterday on the Github repository openai-python (github[dot]com/openai/openai-python/issues/2065). I’ve been asked to post here instead, since the issue seemed more related to the API than to the SDK.
I’ve been encountering an issue recently, without changing my codebase:
When chatting with the model, after a few turns I often get an error that I never had before, which crashes my app (see video in the GitHub issue, the crash occurs at ~1m20s).
I feel like it happens mostly during long responses, hence the tasks shown in the video, but I may be wrong about this.
Did something change recently on the OpenAI API side?
This change and updating the langchain-openai and langchain-core library to the last version.
The frequency of this error was reduced considerably, but not completely, from occurring in half of the executions to approximately 10%.
The function init_chat_model allows to use it with several providers, besides OpenAI, and I have not encountered the error with others. I am waiting to see if langchain-openai releases an update with something related to this problem.
I have updated the openai library to 1.61.0 version and I can no longer reproduce the error (I can’t say for sure that it is solved, but that it is less frequent).
I have changed the configuration of my client to use the model “gpt-4o-2024-11-20” which is the latest gtp-4o, at the time of my post gtp-4o points to gpt-4o-2024-08-06.
Now it works without issue
Good catch, I had not thought about testing other models!
I also seem to have less failures using gpt-4o-2024-11-20, but I still got one during my testing… It is also worth noting that the output style changes quite much between these two versions.
Some explanation and advice from the OpenAI team would be welcome.
Hello! in my case, the error occurred again (I do not understand why), but I solved it (for now and I hope it stays that way), using the model gpt-4o-2024-11-20 . I don’t know why gpt-4o keeps pointing to the other one which is older.
Hello everyone,
I’m working on a PDF RAG app and I’m also getting an error like mentioned in the title of the post.
In my PDF RAG app, I use gpt-4o-mini as the LLM . I use LLM to process pdfs ( I create summaries of images and text chunks , then I store those summaries to Pinecone vector store and the original text chunks and images to MongoDB doc store ) and to facilitate QA .