Files
Auto-GPT/run.sh
Steve 9e5492bd13 Add CLI args for ai_name, ai_role, and ai_goals (#3250)
* add capability to specify AI config at cmd line

* Make `--ai-goal` multi-parameter

* Fix argument forwarding in run.sh

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-07 04:19:18 +02:00

30 lines
739 B
Bash
Executable File

#!/usr/bin/env bash
function find_python_command() {
if command -v python &> /dev/null
then
echo "python"
elif command -v python3 &> /dev/null
then
echo "python3"
else
echo "Python not found. Please install Python."
exit 1
fi
}
PYTHON_CMD=$(find_python_command)
if $PYTHON_CMD -c "import sys; sys.exit(sys.version_info < (3, 10))"; then
$PYTHON_CMD scripts/check_requirements.py requirements.txt
if [ $? -eq 1 ]
then
echo Installing missing packages...
$PYTHON_CMD -m pip install -r requirements.txt
fi
$PYTHON_CMD -m autogpt "$@"
read -p "Press any key to continue..."
else
echo "Python 3.10 or higher is required to run Auto GPT."
fi