Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,9 +27,12 @@ def enhanced_chat_response(user_input, max_tokens, temperature, top_p):
|
|
| 27 |
token = message.choices[0].delta.content
|
| 28 |
if token:
|
| 29 |
response_text += token
|
| 30 |
-
|
| 31 |
except Exception as e:
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
response_text = response_text.strip()
|
| 35 |
|
|
|
|
| 27 |
token = message.choices[0].delta.content
|
| 28 |
if token:
|
| 29 |
response_text += token
|
| 30 |
+
|
| 31 |
except Exception as e:
|
| 32 |
+
print(f"API Error: {e}") # This will show in console
|
| 33 |
+
print(f"Error type: {type(e)}")
|
| 34 |
+
response_text = f"API Fehler: {str(e)}" # Show actual error to user
|
| 35 |
+
|
| 36 |
|
| 37 |
response_text = response_text.strip()
|
| 38 |
|