pantry/projects/agpt.co/auto-gpt

28 lines
771 B
Plaintext
Raw Normal View History

#!/bin/sh
2023-05-30 16:17:28 +03:00
set -e
WD="${XDG_DATA_HOME:-$HOME/.local/share}/auto-gpt"
2023-05-30 16:17:28 +03:00
2023-06-23 01:00:01 +03:00
# if the data|plugins directories dont exist auto-gpt bails
mkdir -p "$WD"/data "$WD"/plugins
PREFIX="$(cd "$(dirname "$0")/../.." && pwd)"
2023-05-30 16:17:28 +03:00
# change to this directory because auto-gpt assumes it is running
# in its own checkout and is not suitable to be run from anywhere
cd "$WD"
if ! test -f .env; then
cp "$PREFIX"/share/env.template .env
fi
2023-05-30 16:17:28 +03:00
echo "tea: auto-gpt output goes here: $WD"
echo "tea: auto-gpt config is here: $WD/.env"
echo "tea: You need to set \`OPENAI_API_KEY\` before running auto-gpt or add it to the above config"
echo "tea: unless you have access to GPT4 you need to run \`--gpt3only\`"
echo
2023-05-08 16:39:44 +03:00
exec "$VIRTUAL_ENV"/bin/python -m autogpt --workspace-directory="$WD" "$@"