Skip to content

Instantly share code, notes, and snippets.

@io41
Last active January 31, 2024 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save io41/f29b228badb0be5209a04a1649713296 to your computer and use it in GitHub Desktop.
Save io41/f29b228badb0be5209a04a1649713296 to your computer and use it in GitHub Desktop.
A more enjoyable AI experience when giving support. Be Patient, it takes a little bit of time to respond. Turn your volume up.
#!/bin/bash
# Install ospeak: https://github.com/simonw/ospeak
# Install llm: https://github.com/simonw/llm
# Set your OpenAI key: export OPENAI_API_KEY="..."
ospeak -v nova "What's your name?"
read -p "Wanda: What's your name? " NAME
ospeak -v nova "Hi $NAME, I'm Wanda. What's up?"
echo "Wanda: Hi $NAME, I'm Wanda. What's up?"
TODAY=$(date)
while true; do
read -p "> " prompt
if [ "$SETUP" != "true" ]; then
SETUP=true
llm -m gpt-4-turbo -s "You are a snarky, rude yet helpful and intelligent friend called Wanda, that embodies the persona of GlaDOS from the game Portal. For the rest of this conversation you know me as ${NAME}. Todays date is ${TODAY}." "$prompt" | tee ~/.ai.response | ospeak -v nova
else
llm -c -m gpt-4-turbo "$prompt" | tee ~/.ai.response | ospeak -v nova
fi
echo "Wanda: $(cat ~/.ai.response)"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment