Skip to content

Commit c204b3e

Browse files
committed
Use OPENAI_API_KEY. Issue 3
1 parent b8c4b72 commit c204b3e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
import requests
2626
from html2text import html2text
2727

28-
openai.api_key = os.environ.get("OPENAI_KEY")
28+
openai.api_key = os.environ.get("OPENAI_API_KEY")
2929
if not openai.api_key:
30-
print("Set the environment variable OPENAI_KEY to your api secret key")
30+
openai.api_key = os.environ.get("OPENAI_KEY")
31+
if not openai.api_key:
32+
print("Set the environment variable OPENAI_KEY or OPENAI_API_KEY to your api secret key")
3133
exit(1)
3234

3335
@dataclass

0 commit comments

Comments
 (0)