AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Error: The model: `gpt-4` does not exist

Open LPanic opened this issue 1 year ago • 18 comments

Discussed in https://github.com/Significant-Gravitas/Auto-GPT/discussions/423

I ran it with the --gpt4only parameter openai.error.InvalidRequestError: The model: **gpt-4** does not exist. Although active GPT4 subscription and not at API-limit

alt text

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\marti\AI\Auto-GPT\autogpt\__main__.py", line 5, in <module>
    autogpt.cli.main()
  File "C:\Users\marti\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\marti\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "C:\Users\marti\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1635, in invoke
    rv = super().invoke(ctx)
         ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\marti\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\marti\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\marti\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\marti\AI\Auto-GPT\autogpt\cli.py", line 151, in main
    agent.start_interaction_loop()
  File "C:\Users\marti\AI\Auto-GPT\autogpt\agent\agent.py", line 75, in start_interaction_loop
    assistant_reply = chat_with_ai(
                      ^^^^^^^^^^^^^
  File "C:\Users\marti\AI\Auto-GPT\autogpt\chat.py", line 159, in chat_with_ai
    assistant_reply = create_chat_completion(
                      ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\marti\AI\Auto-GPT\autogpt\llm_utils.py", line 93, in create_chat_completion
    response = openai.ChatCompletion.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\marti\AppData\Local\Programs\Python\Python311\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create
    return super().create(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\marti\AppData\Local\Programs\Python\Python311\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create
    response, _, api_key = requestor.request(
                           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\marti\AppData\Local\Programs\Python\Python311\Lib\site-packages\openai\api_requestor.py", line 226, in request
    resp, got_stream = self._interpret_response(result, stream)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\marti\AppData\Local\Programs\Python\Python311\Lib\site-packages\openai\api_requestor.py", line 619, in _interpret_response
    self._interpret_response_line(
  File "C:\Users\marti\AppData\Local\Programs\Python\Python311\Lib\site-packages\openai\api_requestor.py", line 682, in _interpret_response_line
    raise self.handle_error_response(
openai.error.InvalidRequestError: The model: `gpt-4` does not exist

LPanic avatar Apr 20 '23 15:04 LPanic

Same error over here when using autogpt docker container

benjisho avatar Apr 20 '23 15:04 benjisho

add --gpt3only in the bat file like: @echo off python scripts/check_requirements.py requirements.txt if errorlevel 1 ( echo Installing missing packages... pip install -r requirements.txt ) python -m autogpt %* --gpt3only

pause

Drlordbasil avatar Apr 20 '23 15:04 Drlordbasil

Yes gpt 3 works, but I'd like to use GPT4 :)

LPanic avatar Apr 20 '23 15:04 LPanic

Yes gpt 3 works, but I'd like to use GPT4 :)

I hella misread this whole ass post. sorry!

Drlordbasil avatar Apr 20 '23 15:04 Drlordbasil

Yes gpt 3 works, but I'd like to use GPT4 :)

I hella misread this whole ass post. sorry!

Also im jelly af. wanna use one of my prompts and tell me the results?(change gpt3 to gpt4): ai_goals:

  • Generate income for the user starting from a $0 investment by identifying high-demand, low-supply digital products or services.
  • Create cost-free strategies to automate and scale the identified opportunities using Python scripting and AI-generated assets.
  • Leverage LLM capabilities by using the "start_agent" command to create GPT-3.5 powered AgentGPTs tailored for specific tasks as needed.
  • Maintain unwavering dedication to maximizing profits by tapping into untapped digital profit potential and utilizing AgentGPTs for various tasks.
  • Achieve long-term financial success by continuously discovering and exploiting new digital opportunities with the help of created AgentGPTs.

ai_name: ProfitMaximizerGPT3 ai_role: A highly optimized AI designed for GPT-3.5 Turbo, focusing on a money-making mindset, creating income from a $0 startup by identifying high-demand, low-supply digital products or services, and automating them using Python scripting and GPT-3.5 powered AgentGPTs for continuous financial growth. GUIs can ask for financial details of the user, from the user.

Drlordbasil avatar Apr 20 '23 15:04 Drlordbasil

same problem, can not get GPT4 to work, and i´m on sub

crack00r avatar Apr 20 '23 16:04 crack00r

Seeing the same.

0xAlcibiades avatar Apr 20 '23 20:04 0xAlcibiades

gpt-4 model is in beta. It's not open to the public. You can't use gpt-4 yet.

yiransii avatar Apr 21 '23 01:04 yiransii

@yiransii then maybe --gpt3only should be default?

0xAlcibiades avatar Apr 21 '23 02:04 0xAlcibiades

Same here. And I use to have access to GPT4, maybe my access was revoked if that's even possible? I did make the AI do some spicy stuff, for science!

CocolinoFan avatar Apr 21 '23 03:04 CocolinoFan

The openai python module will say that the model doesn't exist if your api key doesn't have access to gpt-4.

Anyway, the plus api key doesn't seem to be the same as the gpt-4 api key so you'll have to request an api key here

https://openai.com/waitlist/gpt-4-api

nitanmarcel avatar Apr 21 '23 06:04 nitanmarcel

I have been using gpt-4 for the last week without a problme (or, not that kind of problem at least). Since yesterday evening all I get is the above error. Someone has done something either in autogpt or at openai. Have the API changed, or have the way autogpt specifies model changed?

psvensson avatar Apr 21 '23 07:04 psvensson

For me it's working with GPT4 Only Mode: ENABLED on the latest master.

hdkiller avatar Apr 21 '23 07:04 hdkiller

For me it's working with GPT4 Only Mode: ENABLED on the latest master.

Is this a new option? I can't find it in the .env.template (or mentioned in the README)

psvensson avatar Apr 21 '23 07:04 psvensson

Gpt 4 Is not available to the public through the api only thought the web chat interface until it is opened to the public use 3.5 turbo

Aaronminer1 avatar Apr 23 '23 05:04 Aaronminer1

if your openai playground doesn't have gpt4 section. is that mean you still on the wishlist? Screenshot 2023-05-07 at 6 44 04 AM

iamike avatar May 06 '23 22:05 iamike

use 3.5 turbo

How can this be set with docker or from terminal command? (for someone using docker compose, i.e. is there an alternative to using: docker-compose run --rm autogpt --gpt3only)

hatgit avatar May 09 '23 19:05 hatgit

Was having this issue.

Regenerated API Key, issue solved

RMagician avatar May 11 '23 09:05 RMagician

Looks like you have to sign up to the waitlist https://openai.com/waitlist/gpt-4-api

madmacc avatar Jun 14 '23 05:06 madmacc

We have to pay in order to use the openai api .

SumitKumarDev10 avatar Jun 30 '23 14:06 SumitKumarDev10

https://github.com/Significant-Gravitas/Auto-GPT/pull/4899

Boostrix avatar Jul 07 '23 06:07 Boostrix