Andrew Fletcher published: 19 October 2023 1 minute read
OpenAI request timeout?
Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_retry in 4.0 seconds as it raised ServiceUnavailableError: The server is overloaded or not ready yet..
Try increasing the timeout parameter. For example,
llm = ChatOpenAI(temperature=0, model_name=model)
Change to
llm = ChatOpenAI(temperature=0, model_name=model, request_timeout=120)
Related articles
Andrew Fletcher
•
25 Apr 2024
Python issue when installing libraries - error: externally-managed-environment
When attempting to install python libraries on my OSXpip3 install pandas, numpy, matplotlibI'm seeing the following responseserror: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
xyz, where xyz is the...
Andrew Fletcher
•
29 Feb 2024
Python - OSError: [Errno 24] Too many open files
The "Too many open files" error in Python typically occurs when your program has opened more file descriptors than the operating system allows. This error is often seen in situations where files are not being properly closed after use, leading to the exhaustion of available file...
Andrew Fletcher
•
17 Feb 2024
How to update installed Python packages
You can use the pip list --outdated command to view a list of installed Python packages that have newer versions available. This command will show you which packages are outdated and can be updated to the latest versions.Here's how you can use itpip list --outdatedThis command will display a list of...