Spaces:
Sleeping
Sleeping
SushantGautam
commited on
Update app.py
Browse files
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 |
-
|
34 |
-
|
35 |
-
|
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
|