mirror of
https://github.com/jehna/humanify.git
synced 2026-04-27 09:35:58 +03:00
[GH-ISSUE #18] Script process is running for hours but never calls OpenAI API #16
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#16
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 @JungleGenius on GitHub (Jun 26, 2024).
Original GitHub issue: https://github.com/jehna/humanify/issues/18
Hi Jehna,
Thank you for sharing this project.
I'm running this on a Debian Bookworm VM on my Intel Mac.
The script starts and creates the folder named after the output file with the
deobfuscated.jsin it. It also creates several temp files in/tmp/tsx-0. When I look at the process list call stack I seeesbuildas the top most process being run. Thetopcommand shows it using CPU/memory and the logs show the following:However, When I look at my network traffic from the VM I don't see any connections to OpenAI's API endpoint.
Is it normal for it to run this long (several hours) with no errors being thrown and no API calls??
I'm not a regular node user (JavaScript, but not Node). So I'm not sure how to debug this or if something is amiss.
Is it stuck in a loop?
Thanks
-Daniel
@jehna commented on GitHub (Jun 26, 2024):
Which flags are you using to run humanify?
@jehna commented on GitHub (Jun 26, 2024):
Oh, right the verbose output has argv output too. Let me check if that still works on my machine
@JungleGenius commented on GitHub (Jun 26, 2024):
npm start --key=sk-redacted --4k -o x.js x.js.org@JungleGenius commented on GitHub (Jun 26, 2024):
@jehna Look like it was grinding away with 65,000+ tokens. However, It died.
@JungleGenius commented on GitHub (Jul 2, 2024):
Any comments?
@jehna commented on GitHub (Jul 2, 2024):
Sounds very much the same issue as #12
A fix should be straightforward, just have zero time to work on this project at the moment. Would appreciate a PR (see latest comment at #12 for potential fix)
@0xdevalias commented on GitHub (Jul 3, 2024):
From https://github.com/jehna/humanify/issues/18#issuecomment-2192707342
Googling for that error message led me to this thread, which has at least one potential lead/solution to look into (though seems it can also be caused by other things too, based on a later comment in the thread):
@0xdevalias commented on GitHub (Jul 3, 2024):
I also noticed that this project is using the node
openai3.3.0package, whereas it's up to4.52.3now (that might not make a difference at all, but you never know):github.com/jehna/humanify@002fd68d10/package.json (L22)The changelog entries only seem to start from
4.2.0:There are a few bugfix entries related to handling errors while streaming.. I wonder if that might be helpful?
Also some related to tools/functions, eg.
And new model:
We can see that the openai stuff is initially called here, which generates a 'plugin' that is then applied to the code of each of the files extracted with
webcrack:github.com/jehna/humanify@002fd68d10/src/index.ts (L56-L71)With the main logic being implemented here, and the actual SDK call within
codeToVariableRenames:github.com/jehna/humanify@002fd68d10/src/openai/openai.ts (L14-L82)We can also see that it's using the
functionsconfig, which is deprecated now, and replaced bytools:Edit: Captured the above notes in a new more specific issue:
@JungleGenius commented on GitHub (Jul 5, 2024):
@0xdevalias @jehna
So I was able to get a little bit farther just by updating the model's instructions. The whole
response_format: { type: "json_object" },keeps getting rejected as invalid.But now I'm getting this.
Looks like we are getting null values? Not sure how to debug this. I'm just running this from the CLI and editing the source files with mcedit. I don't normally do Node.js development so I don't have a full Node.js IDE handy.
If this was a browser I would just do a console.log() and dump the return variables. I'm hoping to get this working because I need to reverse Closure Compiled file for a whole other client project.
@0xdevalias commented on GitHub (Jul 6, 2024):
@JungleGenius Rejected by what part/with what error/etc? Do you think it relates to the SDK being too old to use that, as per my previous thoughts?
@JungleGenius Pretty sure you should be able to do that here as well, and it would write to the terminal output.
You could also run the node script with debugging enabled and then connect to it from Chrome's debugger if you wanted something more powerful there:
@0xdevalias commented on GitHub (Aug 12, 2024):
See also: