Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -101,9 +101,9 @@ def respond(message, history: list[tuple[str, str]], system_message, max_tokens,
|
|
101 |
if chunk.choices[0].delta.content is not None:
|
102 |
token = chunk.choices[0].delta.content
|
103 |
response += token
|
104 |
-
|
105 |
except Exception as e:
|
106 |
-
|
107 |
|
108 |
# Atualizando o histórico, mas sem mostrar image_result no chat
|
109 |
history.append((message, response))
|
|
|
101 |
if chunk.choices[0].delta.content is not None:
|
102 |
token = chunk.choices[0].delta.content
|
103 |
response += token
|
104 |
+
|
105 |
except Exception as e:
|
106 |
+
return f"An error occurred: {str(e)}"
|
107 |
|
108 |
# Atualizando o histórico, mas sem mostrar image_result no chat
|
109 |
history.append((message, response))
|