SushantGautam commited on
Commit
d40b775
·
verified ·
1 Parent(s): 55eb835

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -29,10 +29,10 @@ from chainlit.input_widget import Select
29
  @cl.on_settings_update
30
  async def setup_agent(settings):
31
  global interactive_key_done
32
- if cl.user_session.get("openai_api_key") == os.environ["OPENAI_API_KEY"]:
33
- os.environ["OPENAI_API_KEY"]= ""
34
- await cl.Message("OpenAI API Key cleared, start a new chat to set new key!").send()
35
- interactive_key_done= False
36
 
37
 
38
  @cl.on_chat_start
 
29
  @cl.on_settings_update
30
  async def setup_agent(settings):
31
  global interactive_key_done
32
+ # if cl.user_session.get("openai_api_key") == os.environ["OPENAI_API_KEY"]:
33
+ os.environ["OPENAI_API_KEY"]= ""
34
+ await cl.Message("OpenAI API Key cleared, start a new chat to set new key!").send()
35
+ interactive_key_done= False
36
 
37
 
38
  @cl.on_chat_start