Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and JasonWeill committed Dec 21, 2023
1 parent bc9ae82 commit dd1a9ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/jupyter-ai-magics/jupyter_ai_magics/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def _ai_env_status_for_provider_markdown(self, provider_id):
# Avoid composing strings, to make localization easier in the future
not_set_title = "You have not set this environment variable, so you cannot use this provider's models."
set_title = "You have set this environment variable, so you can use this provider's models."
env_status_ok = False;
env_status_ok = False
try:
var_name = self.providers[provider_id].auth_strategy.name
env_var_display = f"`{var_name}`"
Expand Down Expand Up @@ -514,7 +514,9 @@ def run_ai_cell(self, args: CellArgs, prompt: str):
) from None
if auth_strategy.type == "multienv":
# Multiple environment variables must be set
missing_vars = [var for var in auth_strategy.names if var not in os.environ]
missing_vars = [
var for var in auth_strategy.names if var not in os.environ
]
raise OSError(
f"Authentication environment variables {missing_vars} are not set.\n"
f"Multiple authentication tokens are required to use models from the {Provider.name} provider.\n"
Expand Down

0 comments on commit dd1a9ac

Please sign in to comment.