unconv / gpt-autopilot

A GPT-4 powered AI agent that can create full projects with iterative prompting
MIT License
291 stars 92 forks source link

Latest version fails to connect to chatgpt models #3

Closed d3287t328 closed 1 year ago

d3287t328 commented 1 year ago

I have tried a few of the latest models and all I get is a Waiting for ChatGPT message. I am able to use the api with other apps and api calls.

Waiting for ChatGPT...
^CERROR in OpenAI request... Trying again
^CTraceback (most recent call last):
  File "/var/home/a/gpt-autopilot/chatgpt.py", line 31, in send_message
    response = openai.ChatCompletion.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

using Python 3.11.3 (main, May 24 2023, 00:00:00) [GCC 13.1.1 20230511 (Red Hat 13.1.1-2)] on linux

installed pip requirements, updated latest openai library version, and I am using config.json for model version.

unconv commented 1 year ago

Latest version is working fine for me with gpt-3.5-turbo-0613 (don't have access to gpt-4-0613 right now because hit my $120 limit on OpenAI). That error seems to indicate that the connection to the ChatGPT API is stalled. If you press Ctrl+C and it says "Trying again" and you wait for a while, does it work then? It has happened to me a couple of times, too, but trying again works. And make sure to wait at least 30 seconds.

unconv commented 1 year ago

Oh, and if an older version works for you, which one? (which commit since there's no versioning right now)

unconv commented 1 year ago

Ahh, is it repeating "Waiting for ChatGPT"? That means you have the wrong model in the settings. Make sure that you are using the 0613 model that supports function calling.

This is caused by me forgetting to add an else: raise to the if at chatgpt.py line 41. I will fix this in the next update.

d3287t328 commented 1 year ago

Run the script through an error checking enhancement in chatgpt4 it will probably catch some good ones!

unconv commented 1 year ago

This should now be fixed in #4