Use load_dotenv() in chat.py and speak.py.

This commit is contained in:
James C. Palmer
2023-04-02 09:32:25 -04:00
parent ef656a0f77
commit 5e746afef8
2 changed files with 8 additions and 0 deletions

View File

@@ -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")