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

Update LLM/API key error logs

Browse files
Files changed (2) hide show
  1. app.py +4 -3
  2. src/slidedeckai/helpers/llm_helper.py +1 -1
app.py CHANGED
@@ -480,9 +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: {ex}'
484
- '\nMake sure that you have provided a valid, correct API key.'
485
- ' Read **[how to get free LLM API keys](https://github.com/barun-saha/slide-deck-ai?tab=readme-ov-file#unmatched-flexibility-choose-your-ai-brain)**.',
 
486
  True
487
  )
488
  else:
 
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:
src/slidedeckai/helpers/llm_helper.py CHANGED
@@ -216,7 +216,7 @@ 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
+ # logger.error('Error in LiteLLM completion: %s', e)
220
  raise
221
 
222