From fdb1a3b954c785399ef304cca685f930c7b1cc01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mats=20Fins=C3=A5s?= <12988459+Xtrah@users.noreply.github.com> Date: Thu, 15 Feb 2024 09:54:21 +0100 Subject: [PATCH] Update Azure OpenAI API to 2024-02-15-preview On April 2, 2024 the following API preview releases will be retired and will stop accepting API requests: 2023-03-15-preview 2023-06-01-preview 2023-07-01-preview 2023-08-01-preview To avoid service disruptions, update to use the latest version 2024-02-15-preview. https://review.learn.microsoft.com/en-us/azure/ai-services/openai/api-version-deprecation --- OAI_CONFIG_LIST_sample | 4 ++-- autogen/oai/client.py | 4 ++-- autogen/oai/completion.py | 2 +- autogen/oai/openai_utils.py | 4 ++-- notebook/agentchat_MathChat.ipynb | 4 ++-- notebook/agentchat_agentoptimizer.ipynb | 2 +- notebook/agentchat_chess.ipynb | 4 ++-- notebook/agentchat_compression.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 ++-- ...at_graph_modelling_language_using_select_speaker.ipynb | 4 ++-- notebook/agentchat_groupchat_research.ipynb | 4 ++-- notebook/agentchat_groupchat_vis.ipynb | 4 ++-- notebook/agentchat_human_feedback.ipynb | 4 ++-- notebook/agentchat_langchain.ipynb | 4 ++-- notebook/agentchat_microsoft_fabric.ipynb | 2 +- notebook/agentchat_planning.ipynb | 4 ++-- notebook/agentchat_qdrant_RetrieveChat.ipynb | 4 ++-- notebook/agentchat_stream.ipynb | 4 ++-- notebook/agentchat_teachability.ipynb | 4 ++-- notebook/agentchat_teachable_oai_assistants.ipynb | 4 ++-- notebook/agentchat_teaching.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 ++++---- test/oai/test_utils.py | 2 +- test/test_logging.py | 2 +- website/blog/2023-12-01-AutoGenStudio/index.mdx | 2 +- website/docs/Use-Cases/enhanced_inference.md | 2 +- website/docs/llm_configuration.ipynb | 4 ++-- 34 files changed, 61 insertions(+), 61 deletions(-) diff --git a/OAI_CONFIG_LIST_sample b/OAI_CONFIG_LIST_sample index 9789627af69f..ef027f815baa 100644 --- a/OAI_CONFIG_LIST_sample +++ b/OAI_CONFIG_LIST_sample @@ -12,13 +12,13 @@ "api_key": "", "base_url": "", "api_type": "azure", - "api_version": "2023-07-01-preview" + "api_version": "2024-02-15-preview" }, { "model": "", "api_key": "", "base_url": "", "api_type": "azure", - "api_version": "2023-07-01-preview" + "api_version": "2024-02-15-preview" } ] diff --git a/autogen/oai/client.py b/autogen/oai/client.py index ccde5f0a6a31..59e598153309 100644 --- a/autogen/oai/client.py +++ b/autogen/oai/client.py @@ -339,7 +339,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": "2023-03-15-preview", + "api_version": "2024-02-15-preview", }, { "model": "gpt-3.5-turbo", @@ -534,7 +534,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., "2023-08-01-preview". + - api_version (str | None): The api version. Default to None. E.g., "2024-02-15-preview". 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 427de9d94fdf..7029e6d10e50 100644 --- a/autogen/oai/completion.py +++ b/autogen/oai/completion.py @@ -739,7 +739,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": "2023-03-15-preview", + "api_version": "2024-02-15-preview", }, { "model": "gpt-3.5-turbo", diff --git a/autogen/oai/openai_utils.py b/autogen/oai/openai_utils.py index 74bf81a401cf..70ae228126ec 100644 --- a/autogen/oai/openai_utils.py +++ b/autogen/oai/openai_utils.py @@ -19,7 +19,7 @@ Assistant = object NON_CACHE_KEY = ["api_key", "base_url", "api_type", "api_version"] -DEFAULT_AZURE_API_VERSION = "2023-12-01-preview" +DEFAULT_AZURE_API_VERSION = "2024-02-15-preview" OAI_PRICE1K = { "text-ada-001": 0.0004, "text-babbage-001": 0.0005, @@ -112,7 +112,7 @@ def get_config_list( # Optionally, define the API type and version if they are common for all keys api_type = 'azure' - api_version = '2023-12-01-preview' + api_version = '2024-02-15-preview' # 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/notebook/agentchat_MathChat.ipynb b/notebook/agentchat_MathChat.ipynb index 8ea4c1f1c03b..bfc44fcd1bcb 100644 --- a/notebook/agentchat_MathChat.ipynb +++ b/notebook/agentchat_MathChat.ipynb @@ -96,14 +96,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-3.5-turbo',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_agentoptimizer.ipynb b/notebook/agentchat_agentoptimizer.ipynb index 78ea14fe9245..a619ce551385 100644 --- a/notebook/agentchat_agentoptimizer.ipynb +++ b/notebook/agentchat_agentoptimizer.ipynb @@ -704,7 +704,7 @@ "EPOCH = 10\n", "OAI_config = {\n", " \"AZURE_OPENAI_API_KEY\": \"gpt-4-1106-preview\",\n", - " \"api_version\": \"2023-12-01-preview\",\n", + " \"api_version\": \"2024-02-15-preview\",\n", " \"azure_endpoint\": \"your_azure_endpoint\",\n", " \"model\": \"your_model\",\n", "}\n", diff --git a/notebook/agentchat_chess.ipynb b/notebook/agentchat_chess.ipynb index acc1b978f6c4..21a3c29fb35c 100644 --- a/notebook/agentchat_chess.ipynb +++ b/notebook/agentchat_chess.ipynb @@ -103,14 +103,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-4-32k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_compression.ipynb b/notebook/agentchat_compression.ipynb index 688c2d0e99e7..3ba57a728b20 100644 --- a/notebook/agentchat_compression.ipynb +++ b/notebook/agentchat_compression.ipynb @@ -115,14 +115,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-4-32k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_cost_token_tracking.ipynb b/notebook/agentchat_cost_token_tracking.ipynb index 0116a0bb6e8c..05655b452009 100644 --- a/notebook/agentchat_cost_token_tracking.ipynb +++ b/notebook/agentchat_cost_token_tracking.ipynb @@ -96,7 +96,7 @@ " \"model\": \"gpt-35-turbo-0613\", # 0613 or newer is needed to use functions\n", " \"base_url\": \"\", \n", " \"api_type\": \"azure\", \n", - " \"api_version\": \"2023-08-01-preview\", # 2023-07-01-preview or newer is needed to use functions\n", + " \"api_version\": \"2024-02-15-preview\", # 2023-07-01-preview or newer is needed to use functions\n", " \"api_key\": \"\"\n", " }\n", "]\n", diff --git a/notebook/agentchat_custom_model.ipynb b/notebook/agentchat_custom_model.ipynb index a35753ad8f6d..c29d38089267 100644 --- a/notebook/agentchat_custom_model.ipynb +++ b/notebook/agentchat_custom_model.ipynb @@ -241,14 +241,14 @@ " \"api_key\": \"\",\n", " \"base_url\": \"\",\n", " \"api_type\": \"azure\",\n", - " \"api_version\": \"2023-08-01-preview\"\n", + " \"api_version\": \"2024-02-15-preview\"\n", " },\n", " {\n", " \"model\": \"gpt-4-32k\",\n", " \"api_key\": \"\",\n", " \"base_url\": \"\",\n", " \"api_type\": \"azure\",\n", - " \"api_version\": \"2023-08-01-preview\"\n", + " \"api_version\": \"2024-02-15-preview\"\n", " }\n", "]\n", "```\n", diff --git a/notebook/agentchat_dalle_and_gpt4v.ipynb b/notebook/agentchat_dalle_and_gpt4v.ipynb index b63ae2ee6460..0426cc6fd2ad 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': '2023-06-01-preview'\n", + " 'api_version': '2024-02-15-preview'\n", " }\n", "]\n", " ```" diff --git a/notebook/agentchat_function_call.ipynb b/notebook/agentchat_function_call.ipynb index 888206401fa1..bb0be8f251bf 100644 --- a/notebook/agentchat_function_call.ipynb +++ b/notebook/agentchat_function_call.ipynb @@ -91,14 +91,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-3.5-turbo-16k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_function_call_currency_calculator.ipynb b/notebook/agentchat_function_call_currency_calculator.ipynb index d498e020e37e..25f698352e92 100644 --- a/notebook/agentchat_function_call_currency_calculator.ipynb +++ b/notebook/agentchat_function_call_currency_calculator.ipynb @@ -94,14 +94,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-3.5-turbo-16k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_graph_modelling_language_using_select_speaker.ipynb b/notebook/agentchat_graph_modelling_language_using_select_speaker.ipynb index a6d3603e1040..9a706a6172fb 100644 --- a/notebook/agentchat_graph_modelling_language_using_select_speaker.ipynb +++ b/notebook/agentchat_graph_modelling_language_using_select_speaker.ipynb @@ -293,14 +293,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-4-32k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_groupchat_research.ipynb b/notebook/agentchat_groupchat_research.ipynb index 89188376519c..8b569f8f5467 100644 --- a/notebook/agentchat_groupchat_research.ipynb +++ b/notebook/agentchat_groupchat_research.ipynb @@ -81,14 +81,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-4-32k-0314',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_groupchat_vis.ipynb b/notebook/agentchat_groupchat_vis.ipynb index 886c93c186e8..d46741d15e61 100644 --- a/notebook/agentchat_groupchat_vis.ipynb +++ b/notebook/agentchat_groupchat_vis.ipynb @@ -98,14 +98,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-4-32k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_human_feedback.ipynb b/notebook/agentchat_human_feedback.ipynb index be40667e794d..41fbed5cd8eb 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': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-3.5-turbo-16k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_langchain.ipynb b/notebook/agentchat_langchain.ipynb index aa77b722e0fc..12ffafff2755 100644 --- a/notebook/agentchat_langchain.ipynb +++ b/notebook/agentchat_langchain.ipynb @@ -127,14 +127,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-3.5-turbo-16k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_microsoft_fabric.ipynb b/notebook/agentchat_microsoft_fabric.ipynb index f4de95f69cf7..55793e0abb1f 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\": \"2023-08-01-preview\",\n", + " \"api_version\": \"2024-02-15-preview\",\n", " },\n", "]" ] diff --git a/notebook/agentchat_planning.ipynb b/notebook/agentchat_planning.ipynb index 6a43cc249cdc..508792f01a57 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': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\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': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " }, # Azure OpenAI API endpoint for gpt-4-32k\n", "]\n", "```\n", diff --git a/notebook/agentchat_qdrant_RetrieveChat.ipynb b/notebook/agentchat_qdrant_RetrieveChat.ipynb index 99aabdf08908..e1152e750ee3 100644 --- a/notebook/agentchat_qdrant_RetrieveChat.ipynb +++ b/notebook/agentchat_qdrant_RetrieveChat.ipynb @@ -267,14 +267,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-3.5-turbo',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_stream.ipynb b/notebook/agentchat_stream.ipynb index 3e963611f24b..7f671bc01660 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': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-3.5-turbo-16k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_teachability.ipynb b/notebook/agentchat_teachability.ipynb index 564fd9e781a1..0f9550bd7b03 100644 --- a/notebook/agentchat_teachability.ipynb +++ b/notebook/agentchat_teachability.ipynb @@ -103,14 +103,14 @@ " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-4-32k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_teachable_oai_assistants.ipynb b/notebook/agentchat_teachable_oai_assistants.ipynb index 8647b4a4171c..9bd69c9d51cd 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': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-4-32k',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/agentchat_teaching.ipynb b/notebook/agentchat_teaching.ipynb index 6d7d34d15d47..45eab8b5cb30 100644 --- a/notebook/agentchat_teaching.ipynb +++ b/notebook/agentchat_teaching.ipynb @@ -60,14 +60,14 @@ " \"api_key\": \"\",\n", " \"base_url\": \"\",\n", " \"api_type\": \"azure\",\n", - " \"api_version\": \"2023-06-01-preview\"\n", + " \"api_version\": \"2024-02-15-preview\"\n", " },\n", " {\n", " \"model\": \"gpt-4-32k\",\n", " \"api_key\": \"\",\n", " \"base_url\": \"\",\n", " \"api_type\": \"azure\",\n", - " \"api_version\": \"2023-06-01-preview\"\n", + " \"api_version\": \"2024-02-15-preview\"\n", " }\n", "]\n", "```\n", diff --git a/notebook/agentchat_two_users.ipynb b/notebook/agentchat_two_users.ipynb index 53aba7985c3d..a7ea0f72faca 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\": \"2023-08-01-preview\"\n", + " \"api_version\": \"2024-02-15-preview\"\n", " },\n", " {\n", " \"model\": \"gpt-4-32k\",\n", " \"api_key\": \"\",\n", " \"base_url\": \"\",\n", " \"api_type\": \"azure\",\n", - " \"api_version\": \"2023-08-01-preview\"\n", + " \"api_version\": \"2024-02-15-preview\"\n", " }\n", "]\n", "```\n", diff --git a/notebook/agentchat_web_info.ipynb b/notebook/agentchat_web_info.ipynb index d10fa1ab825c..31ac248ec9e3 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': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", " {\n", " 'model': 'gpt-4-32k-0314',\n", " 'api_key': '',\n", " 'base_url': '',\n", " 'api_type': 'azure',\n", - " 'api_version': '2023-08-01-preview',\n", + " 'api_version': '2024-02-15-preview',\n", " },\n", "]\n", "```\n", diff --git a/notebook/oai_chatgpt_gpt4.ipynb b/notebook/oai_chatgpt_gpt4.ipynb index 23d68ed8407d..34b5e5357fa6 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': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\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': '2023-06-01-preview',\n", + " 'api_version': '2024-02-15-preview',\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 c6eb95622515..514ba6a4edeb 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': '2023-03-15-preview',\n", + "# 'api_version': '2024-02-15-preview',\n", "# }, # Azure OpenAI API endpoint for gpt-4\n", "# {\n", "# 'api_key': '',\n", "# 'base_url': '',\n", "# 'api_type': 'azure',\n", - "# 'api_version': '2023-03-15-preview',\n", + "# 'api_version': '2024-02-15-preview',\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': '2023-06-01-preview',\n", + "# 'api_version': '2024-02-15-preview',\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': '2023-06-01-preview',\n", + "# 'api_version': '2024-02-15-preview',\n", "# }, # another Azure OpenAI API endpoint for gpt-3.5-turbo with deployment name gpt-35-turbo-v0301\n", "# ]" ] diff --git a/test/oai/test_utils.py b/test/oai/test_utils.py index e10781a9cb78..0d0bb2c794b9 100644 --- a/test/oai/test_utils.py +++ b/test/oai/test_utils.py @@ -54,7 +54,7 @@ "api_key": "111113fc7e8a46419bfac511bb301111", "base_url": "https://1111.openai.azure.com", "api_type": "azure", - "api_version": "2023-07-01-preview" + "api_version": "2024-02-15-preview" }, { "model": "gpt", diff --git a/test/test_logging.py b/test/test_logging.py index 694b9c1d5b38..083a4008d5b4 100644 --- a/test/test_logging.py +++ b/test/test_logging.py @@ -173,7 +173,7 @@ def test_log_oai_client(db_connection): openai_config = { "api_key": "some_key", - "api_version": "2023-12-01-preview", + "api_version": "2024-02-15-preview", "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 b6191eae6c8c..6f758559c994 100644 --- a/website/blog/2023-12-01-AutoGenStudio/index.mdx +++ b/website/blog/2023-12-01-AutoGenStudio/index.mdx @@ -61,7 +61,7 @@ llm_config = LLMConfig( "api_key": "", "base_url": "", "api_type": "azure", - "api_version": "2023-06-01-preview" + "api_version": "2024-02-15-preview" }], temperature=0, ) diff --git a/website/docs/Use-Cases/enhanced_inference.md b/website/docs/Use-Cases/enhanced_inference.md index f8cb40fc7d8f..ad94b9bc8ef6 100644 --- a/website/docs/Use-Cases/enhanced_inference.md +++ b/website/docs/Use-Cases/enhanced_inference.md @@ -250,7 +250,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": "2023-08-01-preview", + "api_version": "2024-02-15-preview", }, { "model": "gpt-3.5-turbo", diff --git a/website/docs/llm_configuration.ipynb b/website/docs/llm_configuration.ipynb index d76b2574fbae..5691f1d794a8 100644 --- a/website/docs/llm_configuration.ipynb +++ b/website/docs/llm_configuration.ipynb @@ -96,7 +96,7 @@ " \"api_type\": \"azure\",\n", " \"api_key\": os.environ['AZURE_OPENAI_API_KEY'],\n", " \"base_url\": \"https://ENDPOINT.openai.azure.com/\",\n", - " \"api_version\": \"2023-03-15-preview\"\n", + " \"api_version\": \"2024-02-15-preview\"\n", " }\n", " ]\n", " ```\n", @@ -293,7 +293,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\": \"2023-12-01-preview\",\n", + " \"api_version\": \"2024-02-15-preview\",\n", " },\n", " {\n", " \"model\": \"llama-7B\",\n",