Skip to content

A programming framework for agentic AI

bump version (#645)

Chi Wang337ac4c5cefe
diff --git a/autogen/oai/completion.py b/autogen/oai/completion.py
index 2fe95e8f6..1e8740c2f 100644
--- a/autogen/oai/completion.py
+++ b/autogen/oai/completion.py
@@ -25,12 +25,12 @@ try:
import diskcache
ERROR = None
-except ImportError:
- ERROR = ImportError(
- "(Deprecated) The autogen.Completion class requires openai<1 and diskcache. "
- "Please switch to autogen.OpenAIWrapper for openai>=1."
- )
+ assert openai.__version__ < "1"
+except (AssertionError, ImportError):
openai_Completion = object
+ # The autogen.Completion class requires openai<1
+ ERROR = AssertionError("(Deprecated) The autogen.Completion class requires openai<1 and diskcache. ")
+
logger = logging.getLogger(__name__)
if not logger.handlers:
# Add the console handler.
diff --git a/autogen/version.py b/autogen/version.py
index 16bf2ffe0..ad7ff4d08 100644
--- a/autogen/version.py
+++ b/autogen/version.py
@@ -1 +1 @@
-__version__ = "0.2.0b4"
+__version__ = "0.2.0b5"
diff --git a/setup.py b/setup.py
index 6c2d3a074..4dc5d4e9d 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ with open(os.path.join(here, "autogen/version.py")) as fp:
__version__ = version["__version__"]
install_requires = [
- "openai==1.1.1",
+ "openai~=1.2",
"diskcache",
"termcolor",
"flaml",
diff --git a/test/agentchat/contrib/test_gpt_assistant.py b/test/agentchat/contrib/test_gpt_assistant.py
index fab3fbb77..59bad7c56 100644
--- a/test/agentchat/contrib/test_gpt_assistant.py
+++ b/test/agentchat/contrib/test_gpt_assistant.py
@@ -13,6 +13,10 @@ try:
except ImportError:
skip_test = True
+config_list = autogen.config_list_from_json(
+ OAI_CONFIG_LIST, file_location=KEY_LOC, filter_dict={"api_type": ["openai"]}
+)
+
def ask_ossinsight(question):
return f"That is a good question, but I don't know the answer yet. Please ask your human developer friend to help you. \n\n{question}"
@@ -38,7 +42,6 @@ def test_gpt_assistant_chat():
"description": "This is an API endpoint allowing users (analysts) to input question about GitHub in text format to retrieve the realted and structured data.",
}
- config_list = autogen.config_list_from_json(OAI_CONFIG_LIST, file_location=KEY_LOC)
analyst = GPTAssistantAgent(
name="Open_Source_Project_Analyst",
llm_config={"tools": [{"type": "function", "function": ossinsight_api_schema}], "config_list": config_list},
@@ -73,7 +76,6 @@ def test_get_assistant_instructions():
and assert that the retrieved instructions match the set instructions.
"""
- config_list = autogen.config_list_from_json(OAI_CONFIG_LIST, file_location=KEY_LOC)
assistant = GPTAssistantAgent(
"assistant",
instructions="This is a test",
@@ -107,7 +109,6 @@ def test_gpt_assistant_instructions_overwrite():
instructions1 = "This is a test #1"
instructions2 = "This is a test #2"
- config_list = autogen.config_list_from_json(OAI_CONFIG_LIST, file_location=KEY_LOC)
assistant = GPTAssistantAgent(
"assistant",
instructions=instructions1,
@@ -144,7 +145,6 @@ def test_gpt_assistant_existing_no_instructions():
"""
instructions = "This is a test #1"
- config_list = autogen.config_list_from_json(OAI_CONFIG_LIST, file_location=KEY_LOC)
assistant = GPTAssistantAgent(
"assistant",
instructions=instructions,