Open imrantechwiz opened 1 year ago
Error: Request failed with status code 400
Same problem here, I tested it here in some cases and got this error 400
+1 running into the same issue
+1 same error when oc multiple files
+1 running into the same issue
should be fixed with a coming PR, thanks <3
Wow, you're doing a great job! @di-sukharev
@di-sukharev
should be fixed with a coming PR, thanks <3
Which PR is it? I still have the same problem with the latest version.
Speaking of latest version, the current 1.1.36 on npm seems to be published incorrectly. When you install it with npm i opencommit@1.1.36
and then do oc --version
, it shows as 1.1.35.
There's probably a mistake made during packaging. Maybe it's time to consider using GitHub Actions.
Running into the same issues and as @wywywywy said, oc --version
still shows as 1.1.35
.
@wywywywy this is a known issue, idk how to config it.. but anyway the 35 version is same as 36. bug is not fixed, but we diagnosed the issue, gonna merge the PR soon.
should be fixed now, pls update npm i -g opencommit
Hmm. With apologies, I updated to 1.1.48 (opencommit --version) and am still getting:
└ ✖ Error: Request failed with status code 400
same here after running npm i -g opencommit
same on 1.1.50
yep, this error persists, could anybody investigate and make a PR?
One of the possible reasons for this problem is that the token has exceeded the limit of 4096. In the code, result of git diff
is split and submitted to the openai API by line breaks if over MAX_REQ_TOKENS
. However, there is a possibility that even after splitting, one sentence still exceeds the limit, which will result in this error.
You can try the following step to re-create the error:
git init
oc
Same results with 1.1.50
I also still have the same problem with version 1.1.50/2.0.0, but I can confirm it only happens with "many changes". It's not about file size. As soon as I touch many changes to multiple files, at some point it will result in err 400, most likely due to MAX_REQ_TOKENS with limit 4096 from openai API limits. If I do small simple commits, it never happens with errors.
For now, I work around this by doing commits earlier after changes instead of waiting until 1 "larger" commit. It's not ideal as multi commits = multiple builds that get triggered, causing more computation expenses etc... I would prefer to do only 1 commit where I really need it.
is there a way to work around that 4096 limit? Can openAI accept bigger? I'm ok with paying more for upgrading something at openai if that solves the problem. But I don't know if something like that is even available.
I'm happy to help where possible, testing, etc... I just don't where to start or how.
Thanks.
Any update on this? It's pretty useless for me at the moment, tbh.
we tried 3 PRs and nothing healed it, if anybody wants to be the HERO who solves this — please do the shot and save us here 🙏 🦺
@di-sukharev I'm going to tackle this topic, I'll give it a try.
@di-sukharev I'm going to tackle this topic, I'll give it a try.
@jlopezlira Did you find working solution?
You sir, are a gentleman and a scholar.
@di-sukharev
Does this update from openAI may be helpful to resolve this issue? They now seem to support up to 16k tokens at a slightly higher price.
Stale issue message
@di-sukharev why is issue closed as "completed"? Because this issue is still existing.
Is this project still ongoing?
@di-sukharev why is issue closed as "completed"? Because this issue is still existing.
Is this project still ongoing?
No recent messages since your last one on Jun 14, so the github-actions bot closed it.
sorry for closing, will add a bigger model context and validate myself
Error: Request failed with status code 400