Update app.py
Browse files
app.py
CHANGED
|
@@ -42,9 +42,12 @@ def main():
|
|
| 42 |
load_dotenv()
|
| 43 |
|
| 44 |
# inform the user that the api key is loaded
|
| 45 |
-
if OPENAI_API_KEY is
|
| 46 |
-
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
| 48 |
# inform user that the model being used is the turbo model
|
| 49 |
st.write("Using the gpt-3.5-turbo-0613 model from OpenAI")
|
| 50 |
|
|
|
|
| 42 |
load_dotenv()
|
| 43 |
|
| 44 |
# inform the user that the api key is loaded
|
| 45 |
+
if os.getenv("OPENAI_API_KEY") is None or os.getenv("OPENAI_API_KEY") == "":
|
| 46 |
+
print("OPENAI_API_KEY is not set")
|
| 47 |
+
exit(1)
|
| 48 |
+
else:
|
| 49 |
+
print("OPENAI_API_KEY is set")
|
| 50 |
+
|
| 51 |
# inform user that the model being used is the turbo model
|
| 52 |
st.write("Using the gpt-3.5-turbo-0613 model from OpenAI")
|
| 53 |
|