From c234e77617338d589cd74e606d19918d91104958 Mon Sep 17 00:00:00 2001 From: Jack Gerrits Date: Tue, 10 Dec 2024 11:03:42 -0500 Subject: [PATCH] Add deprecated alias for openai model clients (#4641) Add alias for openai model clients --- .../src/autogen_ext/models/__init__.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 python/packages/autogen-ext/src/autogen_ext/models/__init__.py diff --git a/python/packages/autogen-ext/src/autogen_ext/models/__init__.py b/python/packages/autogen-ext/src/autogen_ext/models/__init__.py new file mode 100644 index 000000000000..a6b8e23d5a29 --- /dev/null +++ b/python/packages/autogen-ext/src/autogen_ext/models/__init__.py @@ -0,0 +1,18 @@ +from typing_extensions import deprecated + +from .openai import AzureOpenAIChatCompletionClient as AzureOpenAIChatCompletionClientAlias +from .openai import OpenAIChatCompletionClient as OpenAIChatCompletionClientAlias + + +@deprecated( + "autogen_ext.models.OpenAIChatCompletionClient moved to autogen_ext.models.openai.OpenAIChatCompletionClient. This alias will be removed in 0.4.0." +) +class OpenAIChatCompletionClient(OpenAIChatCompletionClientAlias): + pass + + +@deprecated( + "autogen_ext.models.AzureOpenAIChatCompletionClient moved to autogen_ext.models.openai.AzureOpenAIChatCompletionClient. This alias will be removed in 0.4.0." +) +class AzureOpenAIChatCompletionClient(AzureOpenAIChatCompletionClientAlias): + pass