Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version update #2908

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions OAI_CONFIG_LIST_sample
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"api_key": "<your Azure OpenAI API key here>",
"base_url": "<your Azure OpenAI API base here>",
"api_type": "azure",
"api_version": "2024-02-15-preview"
"api_version": "2024-02-01"
},
{
"model": "<your Azure OpenAI deployment name>",
"api_key": "<your Azure OpenAI API key here>",
"base_url": "<your Azure OpenAI API base here>",
"api_type": "azure",
"api_version": "2024-02-15-preview"
"api_version": "2024-02-01"
}
]
4 changes: 2 additions & 2 deletions autogen/oai/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion autogen/oai/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions autogen/oai/openai_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion autogen/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.28"
__version__ = "0.2.29"
4 changes: 2 additions & 2 deletions notebook/agentchat_MathChat.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@
" 'api_key': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\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': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\n",
" 'api_type': 'azure',\n",
" 'api_version': '2024-02-15-preview',\n",
" 'api_version': '2024-02-01',\n",
" },\n",
"]\n",
"```\n",
Expand Down
2 changes: 1 addition & 1 deletion notebook/agentchat_cost_token_tracking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
" \"model\": \"gpt-35-turbo-0613\", # 0613 or newer is needed to use functions\n",
" \"base_url\": \"<your Azure OpenAI API base>\", \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\": \"<your Azure OpenAI API key>\",\n",
" \"tags\": [\"gpt-3.5-turbo\", \"0613\"],\n",
" }\n",
Expand Down
4 changes: 2 additions & 2 deletions notebook/agentchat_custom_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,14 @@
" \"api_key\": \"<your Azure OpenAI API key here>\",\n",
" \"base_url\": \"<your Azure OpenAI API base here>\",\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\": \"<your Azure OpenAI API key here>\",\n",
" \"base_url\": \"<your Azure OpenAI API base here>\",\n",
" \"api_type\": \"azure\",\n",
" \"api_version\": \"2024-02-15-preview\"\n",
" \"api_version\": \"2024-02-01\"\n",
" }\n",
"]\n",
"```\n",
Expand Down
2 changes: 1 addition & 1 deletion notebook/agentchat_dalle_and_gpt4v.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
" ```"
Expand Down
4 changes: 2 additions & 2 deletions notebook/agentchat_function_call.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@
" 'api_key': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\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",
" 'model': 'gpt-3.5-turbo-16k',\n",
" 'api_key': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\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",
Expand Down
4 changes: 2 additions & 2 deletions notebook/agentchat_function_call_currency_calculator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@
" 'api_key': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\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",
" 'model': 'gpt-3.5-turbo-16k',\n",
" 'api_key': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\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",
Expand Down
4 changes: 2 additions & 2 deletions notebook/agentchat_human_feedback.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@
" 'api_key': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\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': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\n",
" 'api_type': 'azure',\n",
" 'api_version': '2024-02-15-preview',\n",
" 'api_version': '2024-02-01',\n",
" },\n",
"]\n",
"```\n",
Expand Down
2 changes: 1 addition & 1 deletion notebook/agentchat_microsoft_fabric.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"]"
]
Expand Down
4 changes: 2 additions & 2 deletions notebook/agentchat_planning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@
" 'api_key': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\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': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\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",
Expand Down
4 changes: 2 additions & 2 deletions notebook/agentchat_stream.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@
" 'api_key': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\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': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\n",
" 'api_type': 'azure',\n",
" 'api_version': '2024-02-15-preview',\n",
" 'api_version': '2024-02-01',\n",
" },\n",
"]\n",
"```\n",
Expand Down
4 changes: 2 additions & 2 deletions notebook/agentchat_teachable_oai_assistants.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@
" 'api_key': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\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': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\n",
" 'api_type': 'azure',\n",
" 'api_version': '2024-02-15-preview',\n",
" 'api_version': '2024-02-01',\n",
" },\n",
"]\n",
"```\n",
Expand Down
4 changes: 2 additions & 2 deletions notebook/agentchat_two_users.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@
" \"api_key\": \"<your Azure OpenAI API key here>\",\n",
" \"base_url\": \"<your Azure OpenAI API base here>\",\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\": \"<your Azure OpenAI API key here>\",\n",
" \"base_url\": \"<your Azure OpenAI API base here>\",\n",
" \"api_type\": \"azure\",\n",
" \"api_version\": \"2024-02-15-preview\"\n",
" \"api_version\": \"2024-02-01\"\n",
" }\n",
"]\n",
"```\n",
Expand Down
4 changes: 2 additions & 2 deletions notebook/agentchat_web_info.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@
" 'api_key': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\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': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\n",
" 'api_type': 'azure',\n",
" 'api_version': '2024-02-15-preview',\n",
" 'api_version': '2024-02-01',\n",
" },\n",
"]\n",
"```\n",
Expand Down
4 changes: 2 additions & 2 deletions notebook/oai_chatgpt_gpt4.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@
" 'api_key': '<your first Azure OpenAI API key here>',\n",
" 'base_url': '<your first Azure OpenAI API base here>',\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': '<your second Azure OpenAI API key here>',\n",
" 'base_url': '<your second Azure OpenAI API base here>',\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",
Expand Down
8 changes: 4 additions & 4 deletions notebook/oai_completion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@
"# 'api_key': '<your first Azure OpenAI API key here>',\n",
"# 'base_url': '<your first Azure OpenAI API base here>',\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': '<your second Azure OpenAI API key here>',\n",
"# 'base_url': '<your second Azure OpenAI API base here>',\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",
Expand Down Expand Up @@ -131,14 +131,14 @@
"# 'api_key': '<your first Azure OpenAI API key here>',\n",
"# 'base_url': '<your first Azure OpenAI API base here>',\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': '<your second Azure OpenAI API key here>',\n",
"# 'base_url': '<your second Azure OpenAI API base here>',\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",
"# ]"
]
Expand Down
2 changes: 1 addition & 1 deletion samples/apps/websockets/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions test/oai/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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]],
},
Expand Down
2 changes: 1 addition & 1 deletion test/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
}
Expand Down
2 changes: 1 addition & 1 deletion website/blog/2023-12-01-AutoGenStudio/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ llm_config = LLMConfig(
"api_key": "<azure_api_key>",
"base_url": "<azure api base url>",
"api_type": "azure",
"api_version": "2024-02-15-preview"
"api_version": "2024-02-01"
}],
temperature=0,
)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/Use-Cases/enhanced_inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions website/docs/topics/llm_configuration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Loading