mirror of
https://github.com/jehna/humanify.git
synced 2026-04-27 17:45:58 +03:00
[GH-ISSUE #174] Failed when processing a large file (13MB) #53
Labels
No labels
bug
enhancement
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/humanify#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chivychao on GitHub (Oct 23, 2024).
Original GitHub issue: https://github.com/jehna/humanify/issues/174
When processing a large source code file, an error occurred approximately 2 hours into the process.
The error message is as follows:
Is this purely a network transmission issue? Is there a way to retry from the breakpoint?
@0xdevalias commented on GitHub (Oct 23, 2024):
Just to tie together a bunch of the potentially related issues:
This seems to be the section of code for implementing better throttling/retry logic (at least for the openai plugin):
Also:
And there is some hacky workaround implementation of throttling code in this comment:
@0xdevalias commented on GitHub (Oct 23, 2024):
While I'm not 100% sure.. I can trigger the same error message in a contrived way with:
Which suggests that the
response.choicesisnull.Based on the code, this seems to be using the OpenAI rename plugin, with this bit in particular hitting the error:
github.com/jehna/humanify@f13e0c75b5/src/plugins/openai/openai-rename.ts (L26-L32)You would probably need to debug log/inspect the full value of
responseto see exactly what was returned to determine what the best fix here is; but I suspect the root cause is going to be the OpenAI API returning a response in an unexpected format, and the humanify code not being robust enough to account for that.A very quick/dirty hacky workaround would be something like this:
@chivychao Does this happen consistently for you, or was it a once off?
@chivychao commented on GitHub (Oct 23, 2024):
Currently, the error has only occurred once.
The response corresponding to the error is as follows:
The response for other cases where there was no error is as follows:
@brianjenkins94 commented on GitHub (Oct 23, 2024):
lol brutal 😆
It works just fine!
@0xdevalias commented on GitHub (Oct 24, 2024):
More just meant it looks like a quick workaround not like a fully polished / configurable integrated feature; didn't intend any disrespect by it.