First "proper" version
This commit is contained in:
+7
-6
@@ -18,14 +18,15 @@ echo "alias yolo=$TARGET_FULLPATH" >> ~/.bash_aliases
|
||||
echo "alias computer=$TARGET_FULLPATH" >> ~/.bash_aliases
|
||||
|
||||
# Windows
|
||||
# Copy yolo.bat to System32 or :
|
||||
# Copy yolo.bat to System32 or Home Directory :
|
||||
cp yolo.bat ~
|
||||
|
||||
|
||||
# (This doesn't work, havent figured it out)
|
||||
|
||||
# Creates two aliases for use
|
||||
alias yolo=$TARGET_FULLPATH
|
||||
alias computer=$TARGET_FULLPATH
|
||||
#alias yolo=$TARGET_FULLPATH
|
||||
#alias computer=$TARGET_FULLPATH
|
||||
|
||||
# Add the aliases to the logon scripts
|
||||
echo "alias yolo=$TARGET_FULLPATH" >> ~/.bash_aliases
|
||||
echo "alias computer=$TARGET_FULLPATH" >> ~/.bash_aliases
|
||||
#echo "alias yolo=$TARGET_FULLPATH" >> ~/.bash_aliases
|
||||
#echo "alias computer=$TARGET_FULLPATH" >> ~/.bash_aliases
|
||||
@@ -4,4 +4,5 @@ REM Work around to not have to type in python.exe yolo.py every time.
|
||||
REM Put in C:/Windows/System32 to allow command to work anywhere
|
||||
|
||||
set /P "prompt=Enter Prompt: "
|
||||
python.exe ~/yolo-ai-cmdbot/yolo.py %prompt%
|
||||
cd ~
|
||||
python.exe yolo-ai-cmdbot/yolo.py %prompt%
|
||||
@@ -12,6 +12,8 @@ import subprocess
|
||||
from termcolor import colored
|
||||
from colorama import init
|
||||
|
||||
import dotenv
|
||||
|
||||
# Check if the user globally disabled the safety switch
|
||||
def get_yolo_safety_switch_config():
|
||||
|
||||
@@ -78,10 +80,12 @@ if __name__ == "__main__":
|
||||
ask_flag = False # safety switch -a command line argument
|
||||
yolo = "" # user's answer to safety switch (-a) question y/n
|
||||
|
||||
# Two options for the user to specify they openai api key
|
||||
home_path = os.path.expanduser("~")
|
||||
openai.api_key = os.getenv("OPENAI_API_KEY")
|
||||
|
||||
# Two options for the user to specify they openai api key. Windows: Comment out the one you are not using (Causes extra line to appear)
|
||||
home_path = os.path.expanduser("~")
|
||||
openai.api_key_path = os.path.join(home_path,".openai.apikey")
|
||||
dotenv.load_dotenv()
|
||||
openai.api_key = os.getenv("OPENAI_API_KEY")
|
||||
|
||||
# Parse arguments and make sure we have at least a single word
|
||||
if len(sys.argv) < 2:
|
||||
|
||||
Reference in New Issue
Block a user