opencommit
opencommit copied to clipboard
Error: Request failed with status code 400
â—“ Generating the commit message.
│
└ ✖ Error: Request failed with status code 400
It may be that the country I am in is not supported. I can't find where to set it the proxy.
hey @wudi
i dont think its the country, you would get smth like 401 or 403. there is an option: file is really big (more than 4096 token).
try commiting different smaller file, if it helps — let me know, i'll check on the that and make error messages more descriptive if possible <3
I have the same problem!
I have the same problem!
does commiting smaller file work?
Just tested with a small file like "readme" and it is working
@homerokzam @wudi does smaller files work for you guys?
ok, looks like sending large files in batches to openAI breaks somewhere. Anyone wants to investigate and make a PR? :)
I just received this error today with a minor change to one file. I was also able to commit no problem with several larger files earlier today with no error.
I have the same error with changed in files which are ~2k I also found out that even if the github page says npm 1.1.24 I am getting 1.1.23 no matter how I force it. It may be a commit issue ?
I received this error today with a minor change to one file. I was also able to commit no problem with several larger files earlier today with no problem.
Not a resolution, but it is definitely related to the number of commits. I restored different staged files and tried again and it worked. However, it is a shame that this limitation exists. Also, it seems to happen 100% of the time when you try to initiate a commit when you have deleted a file/directory from your repo.
I can confirm that this Error: Request failed with status code 400 occurs for large changes. I formatted only one html file with 182 lines of code. oc --no-verify does not help. All good for small changes (few lines of code) in multiple files.
Getting the same error with a simple 1 line change to a README.
I used curl on the api to make sure my token worked and there wasn't any network issues. It would be nice if there was a -verbose or -debug flag to get more details on what the error is.
I'm encountering the same error and I can verify that it's due to a maximum token limit. In my opinion, the error message could be more informative in this scenario.
If you're facing this issue, a possible solution is to remove files with large differences or newly added large files.
ok, looks like sending large files in batches to openAI breaks somewhere. Anyone wants to investigate and make a PR? :)
What do you think about this?
The algorithm:
- Shall we check if the maximum token reaches 4096?
- If so, we can use Langchain's token splitter.
- The texts could be uploaded in smaller chunks, or a summarizer could be created to generate a commit.
This could nicely overcome the problem.
Stale issue message