mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
Use load_dotenv() in chat.py and speak.py.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import os
|
||||
import time
|
||||
import openai
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load environment variables from .env file
|
||||
load_dotenv()
|
||||
|
||||
# Initialize the OpenAI API client
|
||||
openai.api_key = os.getenv("OPENAI_API_KEY")
|
||||
|
||||
Reference in New Issue
Block a user