Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when running poetry run python main.py --prompt "poetry prompt" #150

Open
Montana opened this issue Nov 4, 2023 · 0 comments
Open

Comments

@Montana
Copy link

Montana commented Nov 4, 2023

Hey all,

I run:

poetry run python main.py --prompt "poetry prompt"

Then I get this:

poetry prompt
Traceback (most recent call last):
  File "/Users/montana/Desktop/developer-main/main.py", line 50, in <module>
    main(prompt=prompt, generate_folder_path=args.generate_folder_path, debug=args.debug, model=args.model)
  File "/Users/montana/Desktop/developer-main/smol_dev/main.py", line 33, in main
    shared_deps = plan(prompt, stream_handler, model=model)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/montana/Desktop/developer-main/smol_dev/prompts.py", line 63, in plan
    completion = openai.ChatCompletion.create(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/montana/Library/Caches/pypoetry/virtualenvs/smol-dev-qnshBMw_-py3.11/lib/python3.11/site-packages/openai/api_resources/chat_completion.py", line 25, in create
    return super().create(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/montana/Library/Caches/pypoetry/virtualenvs/smol-dev-qnshBMw_-py3.11/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
    response, _, api_key = requestor.request(
                           ^^^^^^^^^^^^^^^^^^
  File "/Users/montana/Library/Caches/pypoetry/virtualenvs/smol-dev-qnshBMw_-py3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 298, in request
    resp, got_stream = self._interpret_response(result, stream)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/montana/Library/Caches/pypoetry/virtualenvs/smol-dev-qnshBMw_-py3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 700, in _interpret_response
    self._interpret_response_line(
  File "/Users/montana/Library/Caches/pypoetry/virtualenvs/smol-dev-qnshBMw_-py3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 765, in _interpret_response_line
    raise self.handle_error_response(
openai.error.InvalidRequestError: The model `gpt-4-0613` does not exist or you do not have access to it. Learn more: https://help.openai.com/en/articles/7102672-how-can-i-access-gpt-4.

I've exported my OPENAI_API_KEY by running:

export OPENAI_API_KEY=(key)

I still keep getting this error, any ideas? This line:

openai.error.InvalidRequestError: The model `gpt-4-0613` does not exist or you do not have access to it. Learn more: https://help.openai.com/en/articles/7102672-how-can-i-access-gpt-4.

I believe I have access to GPT-4 as I pay for both OpenAI/ChatGPT. I would assume the API keys being generated should work with smol.

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant