- Interactive mission selector with metadata-driven design - 5 educational missions (basics + advanced) - AI assistant roles (Deepbit, Bugsy, Schnippsi, Tobi) - SnakeCam gesture recognition system - Token tracking utilities - CLAUDE.md documentation - .gitignore for logs and secrets
69 lines
2.1 KiB
Bash
Executable File
69 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
||
|
||
# === Mission Mayaeule – Dialog mit der weisen Eule im Crumbforest ===
|
||
|
||
LOGFILE="$HOME/.eule_maya_log.jsonl"
|
||
mkdir -p "$(dirname "$LOGFILE")"
|
||
|
||
API_KEY="$OPENROUTER_API_KEY"
|
||
MODEL="openai/gpt-3.5-turbo"
|
||
|
||
ask_and_log() {
|
||
local thema="$1"
|
||
local frage="$2"
|
||
|
||
echo -e "\n🦉 Kreumeleule fragt:"
|
||
echo "$frage"
|
||
read -p "➤ Deine Gedanken: " user_input
|
||
|
||
full_prompt="$frage\n\nAntwort des Kindes: $user_input"
|
||
echo -e "\n💡 Eule denkt nach …"
|
||
|
||
# Anfrage an OpenRouter vorbereiten
|
||
cat <<EOF > /tmp/eule_maya_request.json
|
||
{
|
||
"model": "$MODEL",
|
||
"temperature": 0.7,
|
||
"messages": [
|
||
{
|
||
"role": "system",
|
||
"content": "Du bist die Kreumeleule – ein achtsames, weises Wesen im Crumbforest. Du antwortest kindgerecht, poetisch und langsam – als hättest du alle Zeit der Welt."
|
||
},
|
||
{
|
||
"role": "user",
|
||
"content": "$full_prompt"
|
||
}
|
||
]
|
||
}
|
||
EOF
|
||
|
||
# Anfrage senden
|
||
curl -s https://openrouter.ai/api/v1/chat/completions \
|
||
-H "Authorization: Bearer $API_KEY" \
|
||
-H "Content-Type: application/json" \
|
||
-d @/tmp/eule_maya_request.json \
|
||
-o /tmp/eule_maya_response.json
|
||
|
||
antwort_poetisch=$(jq -r '.choices[0].message.content' /tmp/eule_maya_response.json)
|
||
|
||
echo -e "\n🦉 Die Eule antwortet:"
|
||
echo "$antwort_poetisch"
|
||
|
||
# Logging
|
||
jq -nc \
|
||
--arg t "$(date -Iseconds)" \
|
||
--arg thema "$thema" \
|
||
--arg frage "$frage" \
|
||
--arg antwort "$user_input" \
|
||
--arg eule "$antwort_poetisch" \
|
||
'{timestamp: $t, thema: $thema, frage: $frage, antwort: $antwort, eule: $eule}' >> "$LOGFILE"
|
||
}
|
||
|
||
# Themen
|
||
ask_and_log "Symmetrie" "Wenn du in den Spiegel schaust – ist das dann du? Und was, wenn der Spiegel dich plötzlich nicht mehr spiegelt?"
|
||
ask_and_log "Singularität" "Was passiert, wenn alles gleichzeitig möglich ist – aber nur *eins* geschieht?"
|
||
ask_and_log "Kontext" "Was bedeutet ein Wort, wenn niemand zuhört? Und wie klingt es in einem Wald voller Stimmen?"
|
||
ask_and_log "Emergenz" "Kannst du sehen, was entsteht, wenn viele tanzen – obwohl keiner die Choreografie kennt?"
|
||
|
||
echo -e "\n🌌 Die Kreumeleule flattert davon – aber ihre Fragen bleiben."
|