Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,11 +94,10 @@ async def wait_for_key():
|
|
| 94 |
model=model,
|
| 95 |
messages=[{"role": "system", "content": "test"}],
|
| 96 |
max_tokens=1,
|
| 97 |
-
stream=True,
|
| 98 |
)
|
| 99 |
if stream:
|
| 100 |
await cl.Message(content="api-key setted, you can start chatting!", indent=1).send()
|
| 101 |
-
cl.user_session.set("
|
| 102 |
except Exception as e:
|
| 103 |
await cl.Message(content=f"{e}", indent=1).send()
|
| 104 |
return await wait_for_key()
|
|
|
|
| 94 |
model=model,
|
| 95 |
messages=[{"role": "system", "content": "test"}],
|
| 96 |
max_tokens=1,
|
|
|
|
| 97 |
)
|
| 98 |
if stream:
|
| 99 |
await cl.Message(content="api-key setted, you can start chatting!", indent=1).send()
|
| 100 |
+
cl.user_session.set("api_key", res["content"])
|
| 101 |
except Exception as e:
|
| 102 |
await cl.Message(content=f"{e}", indent=1).send()
|
| 103 |
return await wait_for_key()
|