Last active
January 31, 2024 22:01
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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