From 486c2fee1f747c1118d423809a2ad22ddff54e52 Mon Sep 17 00:00:00 2001 From: Qingyun Wu Date: Sun, 12 Nov 2023 14:41:38 -0500 Subject: [PATCH] error --- autogen/oai/completion.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/autogen/oai/completion.py b/autogen/oai/completion.py index 78a31525703..1e8740c2f04 100644 --- a/autogen/oai/completion.py +++ b/autogen/oai/completion.py @@ -13,10 +13,6 @@ try: import openai -except ImportError: - ERROR = ImportError("openai is required.") - -try: from openai import ( RateLimitError, APIError, @@ -30,7 +26,7 @@ ERROR = None assert openai.__version__ < "1" -except AssertionError or ImportError: +except (AssertionError, ImportError): openai_Completion = object # The autogen.Completion class requires openai<1 ERROR = AssertionError("(Deprecated) The autogen.Completion class requires openai<1 and diskcache. ")