Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrades openai to version 1, removes openai history in magics #551

Merged
merged 12 commits into from
Jan 5, 2024
Prev Previous commit
Next Next commit
Suppress warning re custom exception handler
  • Loading branch information
JasonWeill committed Jan 4, 2024
commit 2b809e4f10a4059a50a0fab303dd2e909cdcf35f
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.",
)

JasonWeill marked this conversation as resolved.
Show resolved Hide resolved
self.providers = get_lm_providers()

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