News for hackers. Stuff that matters.
Re:Become a 1000x engineer or die tryin by quasarj on Wednesday March 29, 2023 @01:37PM (#35360541)
I couldn't figure out how to replicate the gpt_data one, how did you replicate the "string join" part? I'm not exactly sure what it was supposed to be putting in the json. I mean, obviously the full data in the second parameter, but I'm unsure how to encode that..
Re:Become a 1000x engineer or die tryin by senko on Wednesday March 29, 2023 @01:53PM (#35360779)
What I did instead is just join all the args with spaces (so I don't need to use quotes around the prompt), with no care about the newlines, and it seems to work okay for me with multiline input:

    prompt="$*"
Here's the complete script: https://gist.github.com/senko/68026864d502473eacd56b2e16e401...

Since I can use this with multiline input I didn't create a separate data-gpt one.

(Note I also used gpt-3.5-turbo model and not gpt-4 because the former is faster and cheaper and for quick one-offs from cmdline it's usually enough for me).