ajwthompson commited on
Commit
f6d4bed
·
1 Parent(s): 3d1532c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 api_key:
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"] = ""