Skip to content

Commit

Permalink
Suppress warning re custom exception handler
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonWeill committed Jan 4, 2024
1 parent 2ede04b commit d390f20
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/jupyter-ai-magics/jupyter_ai_magics/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ def __init__(self, shell):
"`from langchain.chat_models import ChatAnthropic` instead",
)

# suppress warning about our exception handler
warnings.filterwarnings(
"ignore",
message="IPython detected, but you already "
"have a custom exception handler installed. I'll skip installing "
"Trio's custom handler, but this means exception groups will not "
"show full tracebacks.",
)

self.providers = get_lm_providers()

# initialize a registry of custom model/chain names
Expand Down

0 comments on commit d390f20

Please sign in to comment.