News for hackers. Stuff that matters.
Re:Programming with ChatGPT by russfink on Wednesday August 28, 2024 @01:57PM (#41382253)
When will AI integrate with argument parsers?

ffmpeg —-ai “convert this video to NTSC output and make the audio track quieter” my input.avi

Re:Programming with ChatGPT by simonw on Wednesday August 28, 2024 @02:00PM (#41382294)
I built a tool for that back in March: https://simonwillison.net/2024/Mar/26/llm-cmd/

    llm cmd use imagemagick to convert goats.jpg into four different JPEG qualities
I ran that just now and it suggested:

    convert goats.jpg -quality 10 goats_quality_10.jpg && \
      convert goats.jpg -quality 30 goats_quality_30.jpg && \
      convert goats.jpg -quality 50 goats_quality_50.jpg && \
      convert goats.jpg -quality 90 goats_quality_90.jpg
Which, sure enough, produced me a bunch of different quality images!
Re:Programming with ChatGPT by pandeiro on Wednesday August 28, 2024 @03:14PM (#41383136)
Your tool is really cool, thanks for making it and sharing.

I notice that a lot of times, the multi-line output I get from my prompts is truncated or the model just aborts or something. The exit code is still 0 but it seems like something went wrong.

Re:Programming with ChatGPT by simonw on Wednesday August 28, 2024 @03:22PM (#41383202)
Which model / plugin are you using there?
Re:Programming with ChatGPT by pandeiro on Wednesday August 28, 2024 @03:32PM (#41383305)
I'm using Meta-Llama-3-8B-Instruct.

BTW it's a great project and I see it's gotten massive adoption on Github, with plenty of Issues to follow. Curse of success!

Thanks again.

EDIT: Created an Issue for it, probably a more appropriate place to file this ;)

https://github.com/simonw/llm/issues/561

Re:Programming with ChatGPT by throwup238 on Wednesday August 28, 2024 @03:44PM (#41383431)
aichat has shell integration scripts that allow you to write English into the command line and press Alt+E to have it replaced with a command: https://github.com/sigoden/aichat/tree/main/scripts/shell-in...

So you'd just type "use ffmpeg to convert 'my input.avi' to NTSC output and make the audio track quieter" => Alt+E => replaced with `ffmpeg -i "my input.avi" -target ntsc-dvd -af "volume=0.5" "output.mpg`