We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0ffd1d commit f2c7516Copy full SHA for f2c7516
main.py
@@ -15,6 +15,13 @@
15
16
openai.api_key = os.getenv("OPENAI_API_KEY", "YOUR-OPENAI-KEY-HERE")
17
18
+if not openai.api_key:
19
+ # in order to use application, you need to set OPENAI_API_KEY
20
+ # provide example usage
21
+ print(f"{RED}In order to use this application, you need to set OPENAI_API_KEY environment variable.{RESET}
22
+ \n"
23
+ f"{RED}Example: export OPENAI_API_KEY=your_openai_key{RESET}")
24
+ sys.exit(1)
25
26
def call_openai_for_command(user_message, chat_history=None):
27
"""
0 commit comments