ChatOpenAI has an argument called request_timeout that's set to 60 seconds per default. This is too little for complex GPT-4 responses. Consequently MicroGPT runs into timeouts.
% python microgpt.py "Create a 3D animation of the Earth using an Earth map downloaded from the Internet as a texture."
Working directory is /Users/bernhardmueller/microgpt
MicroGPT: Search for an Earth map texture to be used in the 3D animation.
Cmd: web_search, Arg: "Earth map texture"
Press enter to perform this action or abort by typing feedback:
MicroGPT: Found a high-resolution Earth texture map.
Cmd: web_scrape, Arg: "http://planetpixelemporium.com/earth8081.html"
Press enter to perform this action or abort by typing feedback:
/Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_retry in 1.0 seconds as it raised Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60).
-Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_retry in 2.0 seconds as it raised Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60).
\Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_retry in 4.0 seconds as it raised Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60).
Desired behaviour
Allow the user to override request_timeout when initializing the ThinkGPT instance.
ChatOpenAI
has an argument calledrequest_timeout
that's set to 60 seconds per default. This is too little for complex GPT-4 responses. Consequently MicroGPT runs into timeouts.Desired behaviour
Allow the user to override
request_timeout
when initializing theThinkGPT
instance.