insprired by https://nickherrig.com/posts/streaming-requests
type a question into your terminal, get an ai respose
write pretty much the same code as the source blog, just using the entire source command+args to craft our input
question = " ".join(argv)
make symlinks to cover all of the five w's
╭─riley@hurley ~/.local/bin
╰─➤ ln -s who what
╭─riley@hurley ~/.local/bin
╰─➤ ln -s who when
╭─riley@hurley ~/.local/bin
╰─➤ ln -s who where
╭─riley@hurley ~/.local/bin
╰─➤ ln -s who why
╭─riley@hurley ~/.local/bin
╰─➤ ln -s who how
╭─riley@hurley ~/.local/bin
╰─➤ ll
total 625
lrwxrwxrwx 1 riley riley 3 Apr 28 17:19 how -> who
lrwxrwxrwx 1 riley riley 3 Apr 28 17:19 what -> who
lrwxrwxrwx 1 riley riley 3 Apr 28 17:19 when -> who
lrwxrwxrwx 1 riley riley 3 Apr 28 17:19 where -> who
-rwxr-xr-x 1 riley riley 610 Apr 28 17:16 who
lrwxrwxrwx 1 riley riley 3 Apr 28 17:19 why -> who
make sure these get found first in our path (if there are conflicting commands, i dont use them):
export PATH=$HOME/.local/bin:/usr/local/go/bin:$PATH
test it out
╭─riley@hurley ~
╰─➤ who won the 1996 nba finals
A blast from the past!
The Chicago Bulls, led by Michael Jordan, defeated the Seattle SuperSonics in the 1996 NBA Finals, winning the series 4-1. This was the Bulls' fourth NBA championship under Jordan's leadership.
abbreviated and annotated export of my shell history after completing the above work
# writing the code
code ~/.local/bin/who
# trying it out
who won the 1996 nba finals
# fixing path order
vim ~/.zshrc
# trying it out again
who won the 1996 nba finals
how can i connect to a postgres database using python