pantry/projects/agpt.co/auto-gpt
2023-05-30 09:19:22 -04:00

19 lines
601 B
Python
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/python
import os
# Get the XDG base directory path
xdg_base_dir = os.environ.get('XDG_DATA_HOME') or os.path.expanduser(os.path.join('~', '.local', 'share'))
shared_data_dir = os.path.join(xdg_base_dir, 'agpt.co')
# if the data directory doesnt exist auto-gpt bails
os.makedirs(os.path.join(shared_data_dir, "data"), exist_ok=True)
# change to this directory because auto-gpt assumes it is running
# in its own checkout and is not suitable to be run from anywhere
os.chdir(shared_data_dir)
print(f"tea: OUTPUT WILL BE HERE: {shared_data_dir}")
import autogpt.cli
autogpt.cli.main()