From 2d6c8c012bfd206998ffd76e470b9db4d2ed2a5b Mon Sep 17 00:00:00 2001 From: Chi Wang Date: Mon, 10 Jun 2024 11:23:51 -0700 Subject: [PATCH] version update (#2908) * version update * version update --- OAI_CONFIG_LIST_sample | 4 ++-- autogen/oai/client.py | 4 ++-- autogen/oai/completion.py | 2 +- autogen/oai/openai_utils.py | 4 ++-- autogen/version.py | 2 +- notebook/agentchat_MathChat.ipynb | 4 ++-- notebook/agentchat_cost_token_tracking.ipynb | 2 +- notebook/agentchat_custom_model.ipynb | 4 ++-- notebook/agentchat_dalle_and_gpt4v.ipynb | 2 +- notebook/agentchat_function_call.ipynb | 4 ++-- .../agentchat_function_call_currency_calculator.ipynb | 4 ++-- notebook/agentchat_human_feedback.ipynb | 4 ++-- notebook/agentchat_microsoft_fabric.ipynb | 2 +- notebook/agentchat_planning.ipynb | 4 ++-- notebook/agentchat_stream.ipynb | 4 ++-- notebook/agentchat_teachable_oai_assistants.ipynb | 4 ++-- notebook/agentchat_two_users.ipynb | 4 ++-- notebook/agentchat_web_info.ipynb | 4 ++-- notebook/oai_chatgpt_gpt4.ipynb | 4 ++-- notebook/oai_completion.ipynb | 8 ++++---- samples/apps/websockets/application.py | 2 +- test/oai/test_utils.py | 4 ++-- test/test_logging.py | 2 +- website/blog/2023-12-01-AutoGenStudio/index.mdx | 2 +- website/docs/Use-Cases/enhanced_inference.md | 2 +- website/docs/topics/llm_configuration.ipynb | 4 ++-- 26 files changed, 45 insertions(+), 45 deletions(-) diff --git a/OAI_CONFIG_LIST_sample b/OAI_CONFIG_LIST_sample index 9fc0dc803a06..aa0b39216298 100644 --- a/OAI_CONFIG_LIST_sample +++ b/OAI_CONFIG_LIST_sample @@ -13,13 +13,13 @@ "api_key": "", "base_url": "", "api_type": "azure", - "api_version": "2024-02-15-preview" + "api_version": "2024-02-01" }, { "model": "", "api_key": "", "base_url": "", "api_type": "azure", - "api_version": "2024-02-15-preview" + "api_version": "2024-02-01" } ] diff --git a/autogen/oai/client.py b/autogen/oai/client.py index 4c1da7a39311..f1a9c2fbf251 100644 --- a/autogen/oai/client.py +++ b/autogen/oai/client.py @@ -349,7 +349,7 @@ def __init__(self, *, config_list: Optional[List[Dict[str, Any]]] = None, **base "api_key": os.environ.get("AZURE_OPENAI_API_KEY"), "api_type": "azure", "base_url": os.environ.get("AZURE_OPENAI_API_BASE"), - "api_version": "2024-02-15-preview", + "api_version": "2024-02-01", }, { "model": "gpt-3.5-turbo", @@ -559,7 +559,7 @@ def yes_or_no_filter(context, response): ``` - allow_format_str_template (bool | None): Whether to allow format string template in the config. Default to false. - - api_version (str | None): The api version. Default to None. E.g., "2024-02-15-preview". + - api_version (str | None): The api version. Default to None. E.g., "2024-02-01". Raises: - RuntimeError: If all declared custom model clients are not registered - APIError: If any model client create call raises an APIError diff --git a/autogen/oai/completion.py b/autogen/oai/completion.py index e3b01ee4dd80..5a62cde33df0 100644 --- a/autogen/oai/completion.py +++ b/autogen/oai/completion.py @@ -741,7 +741,7 @@ def create( "api_key": os.environ.get("AZURE_OPENAI_API_KEY"), "api_type": "azure", "base_url": os.environ.get("AZURE_OPENAI_API_BASE"), - "api_version": "2024-02-15-preview", + "api_version": "2024-02-01", }, { "model": "gpt-3.5-turbo", diff --git a/autogen/oai/openai_utils.py b/autogen/oai/openai_utils.py index a676e9643904..0c8a0a413375 100644 --- a/autogen/oai/openai_utils.py +++ b/autogen/oai/openai_utils.py @@ -14,7 +14,7 @@ from packaging.version import parse NON_CACHE_KEY = ["api_key", "base_url", "api_type", "api_version", "azure_ad_token", "azure_ad_token_provider"] -DEFAULT_AZURE_API_VERSION = "2024-02-15-preview" +DEFAULT_AZURE_API_VERSION = "2024-02-01" OAI_PRICE1K = { # https://openai.com/api/pricing/ # gpt-4o @@ -127,7 +127,7 @@ def get_config_list( # Optionally, define the API type and version if they are common for all keys api_type = 'azure' - api_version = '2024-02-15-preview' + api_version = '2024-02-01' # Call the get_config_list function to get a list of configuration dictionaries config_list = get_config_list(api_keys, base_urls, api_type, api_version) diff --git a/autogen/version.py b/autogen/version.py index 968391a2dbd2..4f6b515ecb20 100644 --- a/autogen/version.py +++ b/autogen/version.py @@ -1 +1 @@ -__version__ = "0.2.28" +__version__ = "0.2.29" diff --git a/notebook/agentchat_MathChat.ipynb b/notebook/agentchat_MathChat.ipynb index 8a234ede013a..afa00fb7562c 100644 --- a/notebook/agentchat_MathChat.ipynb +++ b/notebook/agentchat_MathChat.ipynb @@ -84,14 +84,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " },\n", " {\n", " 'model': 'gpt-3.5-turbo',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_cost_token_tracking.ipynb b/notebook/agentchat_cost_token_tracking.ipynb index 7feb7a908f4e..fecc98f32763 100644 --- a/notebook/agentchat_cost_token_tracking.ipynb +++ b/notebook/agentchat_cost_token_tracking.ipynb @@ -88,7 +88,7 @@ " \"model\": \"gpt-35-turbo-0613\", # 0613 or newer is needed to use functions\n", " \"base_url\": \"\", \n", " \"api_type\": \"azure\", \n", - " \"api_version\": \"2024-02-15-preview\", # 2023-07-01-preview or newer is needed to use functions\n", + " \"api_version\": \"2024-02-01\", # 2023-07-01-preview or newer is needed to use functions\n", " \"api_key\": \"\",\n", " \"tags\": [\"gpt-3.5-turbo\", \"0613\"],\n", " }\n", diff --git a/notebook/agentchat_custom_model.ipynb b/notebook/agentchat_custom_model.ipynb index b06d2c3cf4e4..5097713a0923 100644 --- a/notebook/agentchat_custom_model.ipynb +++ b/notebook/agentchat_custom_model.ipynb @@ -226,14 +226,14 @@ " \"api_key\": \"\",\n", " \"base_url\": \"\",\n", " \"api_type\": \"azure\",\n", - " \"api_version\": \"2024-02-15-preview\"\n", + " \"api_version\": \"2024-02-01\"\n", " },\n", " {\n", " \"model\": \"gpt-4-32k\",\n", " \"api_key\": \"\",\n", " \"base_url\": \"\",\n", " \"api_type\": \"azure\",\n", - " \"api_version\": \"2024-02-15-preview\"\n", + " \"api_version\": \"2024-02-01\"\n", " }\n", "]\n", "```\n", diff --git a/notebook/agentchat_dalle_and_gpt4v.ipynb b/notebook/agentchat_dalle_and_gpt4v.ipynb index 258b49d6976b..e07578016a98 100644 --- a/notebook/agentchat_dalle_and_gpt4v.ipynb +++ b/notebook/agentchat_dalle_and_gpt4v.ipynb @@ -93,7 +93,7 @@ " {\n", " 'model': 'dalle',\n", " 'api_key': 'Your API Key here',\n", - " 'api_version': '2024-02-15-preview'\n", + " 'api_version': '2024-02-01'\n", " }\n", "]\n", " ```" diff --git a/notebook/agentchat_function_call.ipynb b/notebook/agentchat_function_call.ipynb index c91699d0d44c..2a173c8e2698 100644 --- a/notebook/agentchat_function_call.ipynb +++ b/notebook/agentchat_function_call.ipynb @@ -90,7 +90,7 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01\n", " 'tags': ['tool', 'gpt-3.5-turbo'],\n", " },\n", " {\n", @@ -98,7 +98,7 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01\n", " 'tags': ['tool', 'gpt-3.5-turbo-16k'],\n", " },\n", "]\n", diff --git a/notebook/agentchat_function_call_currency_calculator.ipynb b/notebook/agentchat_function_call_currency_calculator.ipynb index a7a5a92bbd90..d6ce5a88762a 100644 --- a/notebook/agentchat_function_call_currency_calculator.ipynb +++ b/notebook/agentchat_function_call_currency_calculator.ipynb @@ -90,7 +90,7 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " 'tags': ['tool', '3.5-tool'],\n", " },\n", " {\n", @@ -98,7 +98,7 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " 'tags': ['tool', '3.5-tool'],\n", " },\n", "]\n", diff --git a/notebook/agentchat_human_feedback.ipynb b/notebook/agentchat_human_feedback.ipynb index 75078e67cf9c..000d788d6a56 100644 --- a/notebook/agentchat_human_feedback.ipynb +++ b/notebook/agentchat_human_feedback.ipynb @@ -90,14 +90,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " },\n", " {\n", " 'model': 'gpt-3.5-turbo-16k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_microsoft_fabric.ipynb b/notebook/agentchat_microsoft_fabric.ipynb index 55793e0abb1f..58e7ddd20234 100644 --- a/notebook/agentchat_microsoft_fabric.ipynb +++ b/notebook/agentchat_microsoft_fabric.ipynb @@ -578,7 +578,7 @@ " \"api_key\": access_token,\n", " \"base_url\": prebuilt_AI_base_url,\n", " \"api_type\": \"azure\",\n", - " \"api_version\": \"2024-02-15-preview\",\n", + " \"api_version\": \"2024-02-01\",\n", " },\n", "]" ] diff --git a/notebook/agentchat_planning.ipynb b/notebook/agentchat_planning.ipynb index 508792f01a57..14b393958dc1 100644 --- a/notebook/agentchat_planning.ipynb +++ b/notebook/agentchat_planning.ipynb @@ -93,14 +93,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " }, # Azure OpenAI API endpoint for gpt-4\n", " {\n", " 'model': 'gpt-4-32k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " }, # Azure OpenAI API endpoint for gpt-4-32k\n", "]\n", "```\n", diff --git a/notebook/agentchat_stream.ipynb b/notebook/agentchat_stream.ipynb index 8cb899d2b508..8127cdfbab04 100644 --- a/notebook/agentchat_stream.ipynb +++ b/notebook/agentchat_stream.ipynb @@ -90,14 +90,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " },\n", " {\n", " 'model': 'gpt-3.5-turbo-16k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_teachable_oai_assistants.ipynb b/notebook/agentchat_teachable_oai_assistants.ipynb index 9bd69c9d51cd..3753be414f39 100644 --- a/notebook/agentchat_teachable_oai_assistants.ipynb +++ b/notebook/agentchat_teachable_oai_assistants.ipynb @@ -112,14 +112,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " },\n", " {\n", " 'model': 'gpt-4-32k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_two_users.ipynb b/notebook/agentchat_two_users.ipynb index 217492786885..eb9e0c1fbf28 100644 --- a/notebook/agentchat_two_users.ipynb +++ b/notebook/agentchat_two_users.ipynb @@ -70,14 +70,14 @@ " \"api_key\": \"\",\n", " \"base_url\": \"\",\n", " \"api_type\": \"azure\",\n", - " \"api_version\": \"2024-02-15-preview\"\n", + " \"api_version\": \"2024-02-01\"\n", " },\n", " {\n", " \"model\": \"gpt-4-32k\",\n", " \"api_key\": \"\",\n", " \"base_url\": \"\",\n", " \"api_type\": \"azure\",\n", - " \"api_version\": \"2024-02-15-preview\"\n", + " \"api_version\": \"2024-02-01\"\n", " }\n", "]\n", "```\n", diff --git a/notebook/agentchat_web_info.ipynb b/notebook/agentchat_web_info.ipynb index 31ac248ec9e3..f990c128b78c 100644 --- a/notebook/agentchat_web_info.ipynb +++ b/notebook/agentchat_web_info.ipynb @@ -104,14 +104,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " },\n", " {\n", " 'model': 'gpt-4-32k-0314',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " },\n", "]\n", "```\n", diff --git a/notebook/oai_chatgpt_gpt4.ipynb b/notebook/oai_chatgpt_gpt4.ipynb index 34b5e5357fa6..280b7145e931 100644 --- a/notebook/oai_chatgpt_gpt4.ipynb +++ b/notebook/oai_chatgpt_gpt4.ipynb @@ -131,13 +131,13 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " }, # only if at least one Azure OpenAI API key is found\n", " {\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2024-02-15-preview',\n", + " 'api_version': '2024-02-01',\n", " }, # only if the second Azure OpenAI API key is found\n", "]\n", "```\n", diff --git a/notebook/oai_completion.ipynb b/notebook/oai_completion.ipynb index 514ba6a4edeb..ac1b3f9c95f1 100644 --- a/notebook/oai_completion.ipynb +++ b/notebook/oai_completion.ipynb @@ -97,13 +97,13 @@ "# 'api_key': '',\n", "# 'base_url': '',\n", "# 'api_type': 'azure',\n", - "# 'api_version': '2024-02-15-preview',\n", + "# 'api_version': '2024-02-01',\n", "# }, # Azure OpenAI API endpoint for gpt-4\n", "# {\n", "# 'api_key': '',\n", "# 'base_url': '',\n", "# 'api_type': 'azure',\n", - "# 'api_version': '2024-02-15-preview',\n", + "# 'api_version': '2024-02-01',\n", "# }, # another Azure OpenAI API endpoint for gpt-4\n", "# ]\n", "\n", @@ -131,14 +131,14 @@ "# 'api_key': '',\n", "# 'base_url': '',\n", "# 'api_type': 'azure',\n", - "# 'api_version': '2024-02-15-preview',\n", + "# 'api_version': '2024-02-01',\n", "# }, # Azure OpenAI API endpoint for gpt-3.5-turbo\n", "# {\n", "# 'model': 'gpt-35-turbo-v0301',\n", "# 'api_key': '',\n", "# 'base_url': '',\n", "# 'api_type': 'azure',\n", - "# 'api_version': '2024-02-15-preview',\n", + "# 'api_version': '2024-02-01',\n", "# }, # another Azure OpenAI API endpoint for gpt-3.5-turbo with deployment name gpt-35-turbo-v0301\n", "# ]" ] diff --git a/samples/apps/websockets/application.py b/samples/apps/websockets/application.py index f2e453d92482..fe75d135330e 100755 --- a/samples/apps/websockets/application.py +++ b/samples/apps/websockets/application.py @@ -35,7 +35,7 @@ def _get_config_list() -> List[Dict[str, str]]: 'api_key': '0123456789abcdef0123456789abcdef', 'base_url': 'https://my-deployment.openai.azure.com/', 'api_type': 'azure', - 'api_version': '2024-02-15-preview', + 'api_version': '2024-02-01', }, { 'model': 'gpt-4', diff --git a/test/oai/test_utils.py b/test/oai/test_utils.py index d5ad84d8355d..99f8d8d24e8b 100755 --- a/test/oai/test_utils.py +++ b/test/oai/test_utils.py @@ -58,7 +58,7 @@ "api_key": "111113fc7e8a46419bfac511bb301111", "base_url": "https://1111.openai.azure.com", "api_type": "azure", - "api_version": "2024-02-15-preview" + "api_version": "2024-02-01" }, { "model": "gpt", @@ -83,7 +83,7 @@ "expected": JSON_SAMPLE_DICT[2:4], }, { - "filter_dict": {"api_type": "azure", "api_version": "2024-02-15-preview"}, + "filter_dict": {"api_type": "azure", "api_version": "2024-02-01"}, "exclude": False, "expected": [JSON_SAMPLE_DICT[2]], }, diff --git a/test/test_logging.py b/test/test_logging.py index c6f7a182c5c0..bd9a74d3fd47 100644 --- a/test/test_logging.py +++ b/test/test_logging.py @@ -202,7 +202,7 @@ def test_log_oai_client(db_connection): openai_config = { "api_key": "some_key", - "api_version": "2024-02-15-preview", + "api_version": "2024-02-01", "azure_deployment": "gpt-4", "azure_endpoint": "https://foobar.openai.azure.com/", } diff --git a/website/blog/2023-12-01-AutoGenStudio/index.mdx b/website/blog/2023-12-01-AutoGenStudio/index.mdx index 49151f7b355f..4d893b144a78 100644 --- a/website/blog/2023-12-01-AutoGenStudio/index.mdx +++ b/website/blog/2023-12-01-AutoGenStudio/index.mdx @@ -65,7 +65,7 @@ llm_config = LLMConfig( "api_key": "", "base_url": "", "api_type": "azure", - "api_version": "2024-02-15-preview" + "api_version": "2024-02-01" }], temperature=0, ) diff --git a/website/docs/Use-Cases/enhanced_inference.md b/website/docs/Use-Cases/enhanced_inference.md index e97b67fa9dea..14723391e8cf 100644 --- a/website/docs/Use-Cases/enhanced_inference.md +++ b/website/docs/Use-Cases/enhanced_inference.md @@ -183,7 +183,7 @@ client = OpenAIWrapper( "api_key": os.environ.get("AZURE_OPENAI_API_KEY"), "api_type": "azure", "base_url": os.environ.get("AZURE_OPENAI_API_BASE"), - "api_version": "2024-02-15-preview", + "api_version": "2024-02-01", }, { "model": "gpt-3.5-turbo", diff --git a/website/docs/topics/llm_configuration.ipynb b/website/docs/topics/llm_configuration.ipynb index c0a1b7e74a98..f6f383cd85d8 100644 --- a/website/docs/topics/llm_configuration.ipynb +++ b/website/docs/topics/llm_configuration.ipynb @@ -92,7 +92,7 @@ " \"api_type\": \"azure\",\n", " \"api_key\": os.environ['AZURE_OPENAI_API_KEY'],\n", " \"base_url\": \"https://ENDPOINT.openai.azure.com/\",\n", - " \"api_version\": \"2024-02-15-preview\"\n", + " \"api_version\": \"2024-02-01\"\n", " }\n", " ]\n", " ```\n", @@ -328,7 +328,7 @@ " \"api_key\": os.environ.get(\"AZURE_OPENAI_API_KEY\"),\n", " \"api_type\": \"azure\",\n", " \"base_url\": os.environ.get(\"AZURE_OPENAI_API_BASE\"),\n", - " \"api_version\": \"2024-02-15-preview\",\n", + " \"api_version\": \"2024-02-01\",\n", " },\n", " {\n", " \"model\": \"llama-7B\",\n",