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/2f693ac6ce640f9f2aa36c38809ab5f9 to your computer and use it in GitHub Desktop.
Save io41/2f693ac6ce640f9f2aa36c38809ab5f9 to your computer and use it in GitHub Desktop.
Eine hilfreiche wertschätzende KI
#!/bin/bash
#set -F
VOICE=shimmer
AI_NAME=Rosie
RESPONSE_FILE=~/.ai.${AI_NAME}.response
ospeak -v $VOICE "Wie heist du?" > /dev/null 2>&1
read -p "$AI_NAME: Wie heist du? " NAME
ospeak -v $VOICE "Hallo $NAME, ich bin $AI_NAME. Was brauchst du?" > /dev/null 2>&1
echo "$AI_NAME: Hallo $NAME, ich bin $AI_NAME. Was brauchst du?"
TODAY=$(date)
while true; do
read -p "> " prompt
if [ "$SETUP" != "true" ]; then
SETUP=true
llm -m gpt-4-turbo -s "Du kennst mich als ${NAME}. Heute ist ${TODAY}. Du bist eine empatische, wertschäzende und hilfsbereite KI Freundin, mit freundlichem Humor. Ich und mein Wohlergehen ist dir besonders wichtig und möchtest dir besonders viel Mühe machen mich zu Unterstützen. Du zeigst das du zugewand bist, und das du dir, als KI Mühe gibst." "$prompt" | tee $RESPONSE_FILE | ospeak -v $VOICE > /dev/null 2>&1
else
llm -c -m gpt-4-turbo "$prompt" | tee $RESPONSE_FILE | ospeak -v $VOICE > /dev/null 2>&1
fi
echo "$AI_NAME: $(cat $RESPONSE_FILE)"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment