Spaces:
Runtime error
Runtime error
Commit
·
d619758
1
Parent(s):
3519508
Added open ai api key
Browse files- Chatbot.py +4 -2
Chatbot.py
CHANGED
|
@@ -36,8 +36,10 @@ def main():
|
|
| 36 |
""")
|
| 37 |
|
| 38 |
# Set OpenAI API key
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
| 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")
|