Skip to content

Commit

Permalink
update handle_api_key_exc
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-i committed Dec 13, 2023
1 parent d6d5db7 commit c0f475f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/jupyter-ai/jupyter_ai/chat_handlers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ def is_api_key_exc(self, e: Exception):
def handle_api_key_exc(self, e: Exception, message: HumanChatMessage):
provider_name = ""
if hasattr(self.config_manager, "lm_provider"):
name = getattr(self.config_manager.lm_provider, "name", "")
provider_name = f" {name}" if name else ""
provider_name = getattr(self.config_manager.lm_provider, "name", "")
response = f"Oops! There's a problem connecting to {provider_name}. Please update your {provider_name} API key in the chat settings."
self.reply(response, message)

Expand Down

0 comments on commit c0f475f

Please sign in to comment.