Spaces:
Running
Running
Remove API-related raw exception text in user-facing error messages
Browse files- app.py +4 -4
- src/slidedeckai/helpers/llm_helper.py +0 -1
app.py
CHANGED
|
@@ -480,10 +480,10 @@ def set_up_chat_ui():
|
|
| 480 |
except Exception as ex:
|
| 481 |
if 'litellm.AuthenticationError' in str(ex):
|
| 482 |
handle_error(
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
True
|
| 488 |
)
|
| 489 |
else:
|
|
|
|
| 480 |
except Exception as ex:
|
| 481 |
if 'litellm.AuthenticationError' in str(ex):
|
| 482 |
handle_error(
|
| 483 |
+
'LLM API authentication failed. Make sure that you have provided'
|
| 484 |
+
' a valid, correct API key. Read **[how to get free LLM API keys]'
|
| 485 |
+
'(https://github.com/barun-saha/slide-deck-ai?tab=readme-ov-file'
|
| 486 |
+
'#unmatched-flexibility-choose-your-ai-brain)**.',
|
| 487 |
True
|
| 488 |
)
|
| 489 |
else:
|
src/slidedeckai/helpers/llm_helper.py
CHANGED
|
@@ -216,7 +216,6 @@ def stream_litellm_completion(
|
|
| 216 |
yield choice.message.content
|
| 217 |
|
| 218 |
except Exception as e:
|
| 219 |
-
# logger.error('Error in LiteLLM completion: %s', e)
|
| 220 |
raise
|
| 221 |
|
| 222 |
|
|
|
|
| 216 |
yield choice.message.content
|
| 217 |
|
| 218 |
except Exception as e:
|
|
|
|
| 219 |
raise
|
| 220 |
|
| 221 |
|