Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,8 +56,10 @@ fig
|
|
| 56 |
|
| 57 |
|
| 58 |
async def callback(content: str, user: str, instance: pn.chat.ChatInterface):
|
| 59 |
-
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
|
| 62 |
# system
|
| 63 |
messages = [SYSTEM_MESSAGE]
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
async def callback(content: str, user: str, instance: pn.chat.ChatInterface):
|
| 59 |
+
if not api_key_input.value:
|
| 60 |
+
yield "Please first enter your Mistral API key"
|
| 61 |
+
return
|
| 62 |
+
client = MistralAsyncClient(api_key=api_key_input.value)
|
| 63 |
|
| 64 |
# system
|
| 65 |
messages = [SYSTEM_MESSAGE]
|