From ce41a748b24d1108125067d5910ffd2449f65e0f Mon Sep 17 00:00:00 2001 From: Alex Strick van Linschoten Date: Tue, 7 Nov 2023 09:29:22 +0100 Subject: [PATCH] limit openai dependency to <1.0.0 (#2027) --- src/zenml/integrations/openai/__init__.py | 2 +- src/zenml/integrations/openai/hooks/open_ai_failure_hook.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zenml/integrations/openai/__init__.py b/src/zenml/integrations/openai/__init__.py index 11fa9df2fcd..8c1263d7667 100644 --- a/src/zenml/integrations/openai/__init__.py +++ b/src/zenml/integrations/openai/__init__.py @@ -21,7 +21,7 @@ class OpenAIIntegration(Integration): """Definition of OpenAI integration for ZenML.""" NAME = OPEN_AI - REQUIREMENTS = ["openai>=0.27.0"] + REQUIREMENTS = ["openai>=0.27.0,<1.0.0"] OpenAIIntegration.check_installation() diff --git a/src/zenml/integrations/openai/hooks/open_ai_failure_hook.py b/src/zenml/integrations/openai/hooks/open_ai_failure_hook.py index 4b46e8fde71..6bf92fa48eb 100644 --- a/src/zenml/integrations/openai/hooks/open_ai_failure_hook.py +++ b/src/zenml/integrations/openai/hooks/open_ai_failure_hook.py @@ -62,7 +62,7 @@ def openai_alerter_failure_hook_helper( sys.stdout = original_stdout rich_traceback = output_captured.getvalue() - response = openai.ChatCompletion.create( # type: ignore[no-untyped-call] + response = openai.ChatCompletion.create( # type: ignore model=model_name, messages=[ {