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

OpenAI API Error: Request failed with status code 429 - Too Many Requests #60

Closed
3 tasks
luukvhoudt opened this issue Feb 16, 2023 · 5 comments
Closed
3 tasks

Comments

@luukvhoudt
Copy link

After installing and running aicommits a few times in a subdirectory, the command returns:

▲ No staged changes found. Make sure there are changes and run `git add .`

However, I did change directory to the repository root and ran aicommits it returned:

▲ Generating your AI commit message...

▲ OpenAI API Error: Request failed with status code 429 - Too Many Requests

How is this possible? I never used the OpenAI API before, only the chat version. Does the aicommits command also sent a request to the OpenAI API if there is nothing staged? It would help a lot if there was some kind of verbosity flag to get a better understanding of what is happening.

Now aicommits always runs, no matter what you type behind it. This most likely caused me to almost brute force the OpenAI API.

Besides the problem I encountered this issue also proposes 3 feature requests:

  • Add the ability to run aicommits anywhere in the repository (like git status).
  • Add the some kind of verbosity flag.
  • Change the ease of executing the main command, e.g. error on unknown input (like aicommits --help).
@ribeiroevandro
Copy link

Look this https://platform.openai.com/docs/guides/error-codes/api-errors

@ribeiroevandro
Copy link

@luukvhoudt Due to a lack of attention, I did not configure a payment method in OpenAI and for this reason I was receiving the error 429, I had no "balance". After defining a payment method, the CLI started to work perfectly.

@Nutlope
Copy link
Owner

Nutlope commented Feb 16, 2023

Thank you @ribeiroevandro! That's correct, you likely need to add a payment method to OpenAI.

@luukvhoudt We're planning on adding a --help command. Also, what do you mean by the ability to add aicommits anywhere in the repo?

@Nutlope
Copy link
Owner

Nutlope commented Feb 16, 2023

Closing this for now since it was answered above

@Nutlope Nutlope closed this as completed Feb 16, 2023
@luukvhoudt
Copy link
Author

@Nutlope here are some steps to reproduce what I encountered:

  1. Create a git repo
  2. Create a file and a dir
  3. Change the file contents
  4. Cd to the dir
  5. Run aicommits
    > No changes are detected.
  6. Run git status
    > file in repo root is detected as a change.

The feature request was to have aicommits work the similar to git status for this func in particular.

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

3 participants