From 405f5c0fedc69a6d5484a70028f9797192751410 Mon Sep 17 00:00:00 2001 From: Chi Wang Date: Sat, 13 Jan 2024 21:44:30 -0800 Subject: [PATCH] update default aoai version (#1229) * update default aoai version * disable notebook test that is going to be outdated * bump version to 0.2.7 --- autogen/oai/openai_utils.py | 14 +++++++------- autogen/version.py | 2 +- test/agentchat/test_function_call.py | 2 +- test/test_notebook.py | 6 ++++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/autogen/oai/openai_utils.py b/autogen/oai/openai_utils.py index 525a1027cc09..3927ee3691cc 100644 --- a/autogen/oai/openai_utils.py +++ b/autogen/oai/openai_utils.py @@ -18,7 +18,7 @@ Assistant = object NON_CACHE_KEY = ["api_key", "base_url", "api_type", "api_version"] -DEFAULT_AZURE_API_VERSION = "2023-08-01-preview" +DEFAULT_AZURE_API_VERSION = "2023-12-01-preview" OAI_PRICE1K = { "text-ada-001": 0.0004, "text-babbage-001": 0.0005, @@ -96,7 +96,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-08-01-preview' + api_version = '2023-12-01-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) @@ -305,11 +305,11 @@ def config_list_from_models( ``` """ config_list = config_list_openai_aoai( - key_file_path, - openai_api_key_file, - aoai_api_key_file, - aoai_api_base_file, - exclude, + key_file_path=key_file_path, + openai_api_key_file=openai_api_key_file, + aoai_api_key_file=aoai_api_key_file, + aoai_api_base_file=aoai_api_base_file, + exclude=exclude, ) if model_list: config_list = [{**config, "model": model} for model in model_list for config in config_list] diff --git a/autogen/version.py b/autogen/version.py index 01ef12070dc3..6cd38b746590 100644 --- a/autogen/version.py +++ b/autogen/version.py @@ -1 +1 @@ -__version__ = "0.2.6" +__version__ = "0.2.7" diff --git a/test/agentchat/test_function_call.py b/test/agentchat/test_function_call.py index 3f4bdc79ad61..df482fe1c378 100644 --- a/test/agentchat/test_function_call.py +++ b/test/agentchat/test_function_call.py @@ -21,7 +21,7 @@ @pytest.mark.skipif(skip, reason="openai not installed OR requested to skip") def test_eval_math_responses(): config_list = autogen.config_list_from_models( - KEY_LOC, exclude="aoai", model_list=["gpt-4-0613", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-16k"] + KEY_LOC, model_list=["gpt-4-0613", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-16k"] ) functions = [ { diff --git a/test/test_notebook.py b/test/test_notebook.py index 3abdbc230a4b..6e8f80b5f8ab 100644 --- a/test/test_notebook.py +++ b/test/test_notebook.py @@ -105,7 +105,8 @@ def _test_oai_chatgpt_gpt4(save=False): skip or not sys.version.startswith("3.10"), reason="do not run if openai is not installed or py!=3.10", ) -def test_hierarchy_flow_using_select_speaker(save=False): +def _test_hierarchy_flow_using_select_speaker(save=False): + # TODO: recover this test after rewriting after the new group chat api run_notebook("agentchat_hierarchy_flow_using_select_speaker.ipynb", save=save) @@ -131,4 +132,5 @@ def test_oai_client_cost(save=False): # test_oai_completion(save=True) # test_agentchat_MathChat(save=True) # test_agentchat_function_call(save=True) - test_graph_modelling_language_using_select_speaker(save=True) + # test_graph_modelling_language_using_select_speaker(save=True) + test_agentchat_function_call_async(save=True)