Wow. 210+ comments and maaybe 10 of those actually talk about the article! (yes, I've read them all because I can't believe almost everyone missed the point) The point of the article is actually neat: a small shell (Fish) script to send query to ChatGPT or DALL-E and get response back in the terminal. As a terminal user myself, this is really nice! (I rewrote it for myself in bash which I use, but used the curl comma…
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..
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).