deepali1021 commited on
Commit
d619758
·
1 Parent(s): 3519508

Added open ai api key

Browse files
Files changed (1) hide show
  1. Chatbot.py +4 -2
Chatbot.py CHANGED
@@ -36,8 +36,10 @@ def main():
36
  """)
37
 
38
  # Set OpenAI API key
39
- # if openai_api_key:
40
- # os.environ["OPENAI_API_KEY"] = openai_api_key
 
 
41
 
42
  # Main chat interface
43
  st.title("🤖 Intelligent Customer Support Agent")
 
36
  """)
37
 
38
  # Set OpenAI API key
39
+ openai_api_key = os.getenv("OPENAI_API_KEY")
40
+ if not openai_api_key:
41
+ st.error("OpenAI API key not found! Please check your .env file.")
42
+ st.stop()
43
 
44
  # Main chat interface
45
  st.title("🤖 Intelligent Customer Support Agent")