Skip to content

Commit cccdb64

Browse files
committed
pymupdf, pyautogui, and sqlaclehmy and rich all get left out . adjust d the openai get api key resolution to properly raise errori in get openai response
1 parent 25a1de9 commit cccdb64

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

npcsh/response.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,9 @@ def get_openai_response(
230230

231231
# try:
232232
if api_key is None:
233-
api_key = os.environ["OPENAI_API_KEY"]
233+
api_key = os.environ.get("OPENAI_API_KEY", "")
234+
if len(api_key) == 0:
235+
raise ValueError("API key not found.")
234236
client = OpenAI(api_key=api_key)
235237
# print(npc)
236238

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ def get_setup_message():
6161
"matplotlib",
6262
"markdown",
6363
"PyYAML",
64+
"PyMuPDF",
65+
"pyautogui",
6466
"pygments",
67+
"sqlalchemy",
6568
"termcolor",
69+
"rich",
6670
"colorama",
6771
"Pillow",
6872
"python-dotenv",
@@ -102,7 +106,7 @@ def get_setup_message():
102106

103107
setup(
104108
name="npcsh",
105-
version="0.3.27.6",
109+
version="0.3.27.7",
106110
packages=find_packages(exclude=["tests*"]),
107111
install_requires=base_requirements, # Only install base requirements by default
108112
extras_require={

0 commit comments

Comments
 (0)