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.
Use `load_dotenv()` in `chat.py` and `speak.py`.
James C. Palmer5e746afef8eb
diff --git a/scripts/chat.py b/scripts/chat.pyindex f2a5a51bcb..e6aa278150 100644--- a/scripts/chat.py+++ b/scripts/chat.py@@ -1,6 +1,10 @@import osimport timeimport openai+from dotenv import load_dotenv++# Load environment variables from .env file+load_dotenv()# Initialize the OpenAI API clientopenai.api_key = os.getenv("OPENAI_API_KEY")diff --git a/scripts/speak.py b/scripts/speak.pyindex 405c100f2d..a0f29fc586 100644--- a/scripts/speak.py+++ b/scripts/speak.py@@ -1,8 +1,12 @@import osfrom playsound import playsoundimport requests+from dotenv import load_dotenv+# Load environment variables from .env file+load_dotenv()+voices = ["ErXwobaYiN019PkySvjV", "EXAVITQu4vr4xnSDxMaL"]tts_headers = {