barunsaha commited on
Commit
c7f2afc
·
1 Parent(s): d3e3b00

Remove API-related raw exception text in user-facing error messages

Browse files
Files changed (2) hide show
  1. app.py +4 -4
  2. 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
- f'LLM API authentication failed. Make sure that you have provided'
484
- f' a valid, correct API key. Read **[how to get free LLM API keys]'
485
- f'(https://github.com/barun-saha/slide-deck-ai?tab=readme-ov-file'
486
- f'#unmatched-flexibility-choose-your-ai-brain)**.\n\nAdditional info: {ex}',
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