Spaces:
Runtime error
Runtime error
Commit
·
f6d4bed
1
Parent(s):
3d1532c
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def set_openai_api_key(api_key: str):
|
|
14 |
"""Set the api key and return chain.
|
15 |
If no api_key, then None is returned.
|
16 |
"""
|
17 |
-
if
|
18 |
os.environ["OPENAI_API_KEY"] = api_key
|
19 |
chain = get_chain(vectorstore)
|
20 |
os.environ["OPENAI_API_KEY"] = ""
|
|
|
14 |
"""Set the api key and return chain.
|
15 |
If no api_key, then None is returned.
|
16 |
"""
|
17 |
+
if os.environ["OPENAI_API_KEY"]:
|
18 |
os.environ["OPENAI_API_KEY"] = api_key
|
19 |
chain = get_chain(vectorstore)
|
20 |
os.environ["OPENAI_API_KEY"] = ""
|