News for hackers. Stuff that matters.
Re:Language models on the command line by FergusArgyll on Tuesday June 25, 2024 @03:12AM (#40785421)
I made my own python wrapper around the Gemini API, I wanted one feature: there is a default system prompt but -s overrides that with a temporary system prompt. -p is for the prompt, if it is left out, the cli is interactive (one long chat until I exit) but with -p I can use regular linux utils

for example: I wrote a short bash script which uses yt-dlp and ffmpeg to download a song, convert it to my preferred format and then uses gemini to add metadata.

  artist=$(gemini -s "Please respond with the name of the Artist based on 
  the songs title. do not use any other words, just the artist name.
  example:
  'Bruce Springsteen - Old Dan Tucker [S-GHbDFrwlU].opus'
  Bruce Springsteen" -p "$opus_file" | tr -d '\n')

There are no comments on this comment yet.