AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Merge branch 'master' into dev
Andres Caicedo6773e28b61bf
diff --cc scripts/data.pyindex bb8936c11d,72a6bbfc64..7694329aaa--- a/scripts/data.py+++ b/scripts/data.py@@@ -1,12 -1,11 +1,12 @@@-import os+from os import pathfrom pathlib import Path-+ SRC_DIR = Path(__file__).parentdef load_prompt():+ """Load the prompt from data/prompt.txt"""try:# get directory of this file:- file_dir = Path(os.path.dirname(os.path.realpath(__file__)))+ file_dir = Path(path.dirname(path.realpath(__file__)))data_dir = file_dir / "data"prompt_file = data_dir / "prompt.txt"# Load the promt from data/prompt.txtdiff --cc scripts/main.pyindex 8f0400ae9b,93124234e6..e89e57dcd3--- a/scripts/main.py+++ b/scripts/main.py@@@ -334,11 -310,11 +342,12 @@@ while True"NEXT ACTION: ",Fore.CYAN,f"COMMAND = {Fore.CYAN}{command_name}{Style.RESET_ALL} ARGUMENTS = {Fore.CYAN}{arguments}{Style.RESET_ALL}")- print("Enter 'y' to authorise command or 'n' to exit program...", flush=True)-+ print(+ f"Enter 'y' to authorise command or 'n' to exit program, or enter feedback for {ai_name}...",+ flush=True)while True:console_input = input(Fore.MAGENTA + "Input:" + Style.RESET_ALL)+if console_input.lower() == "y":user_input = "GENERATE NEXT COMMAND JSON"breakdiff --cc scripts/speak.pyindex 5a0728a2c7,6fef41f83e..9f32fac277--- a/scripts/speak.py+++ b/scripts/speak.py@@@ -2,8 -2,9 +2,10 @@@ import ofrom playsound import playsoundimport requestsfrom config import Config+cfg = Config()+ import gtts+# TODO: Nicer names for these idsvoices = ["ErXwobaYiN019PkySvjV", "EXAVITQu4vr4xnSDxMaL"]@@@ -13,13 -14,12 +15,12 @@@ tts_headers ="xi-api-key": cfg.elevenlabs_api_key}- def say_text(text, voice_index=0):- """Say text using ElevenLabs API"""+ def eleven_labs_speech(text, voice_index=0):++ """Return the results of a google search"""tts_url = "https://api.elevenlabs.io/v1/text-to-speech/{voice_id}".format(voice_id=voices[voice_index])-formatted_message = {"text": text}- response = requests.post(- tts_url, headers=tts_headers, json=formatted_message)+ response = requests.post(tts_url, headers=tts_headers, json=formatted_message)if response.status_code == 200:with open("speech.mpeg", "wb") as f: