Skip to content

Commit cfa3b1d

Browse files
IANTHEREALekzhu
authored andcommitted
fix openai compatible changes (#2718)
Co-authored-by: Eric Zhu <[email protected]>
1 parent dab7f4c commit cfa3b1d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

autogen/agentchat/contrib/gpt_assistant_agent.py

+1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ def __init__(
169169
# Tools are specified but overwrite_tools is False; do not update the assistant's tools
170170
logger.warning("overwrite_tools is False. Using existing tools from assistant API.")
171171

172+
self.update_system_message(self._openai_assistant.instructions)
172173
# lazily create threads
173174
self._openai_threads = {}
174175
self._unread_index = defaultdict(int)

test/agentchat/contrib/test_gpt_assistant.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
filter_dict={
2929
"api_type": ["openai"],
3030
"model": [
31+
"gpt-4o",
3132
"gpt-4-turbo",
3233
"gpt-4-turbo-preview",
3334
"gpt-4-0125-preview",
@@ -313,7 +314,7 @@ def test_assistant_retrieval() -> None:
313314
"description": "This is a test function 1",
314315
}
315316
function_2_schema = {
316-
"name": "call_function_1",
317+
"name": "call_function_2",
317318
"parameters": {"type": "object", "properties": {}, "required": []},
318319
"description": "This is a test function 2",
319320
}
@@ -383,12 +384,12 @@ def test_assistant_mismatch_retrieval() -> None:
383384
name = f"For test_assistant_retrieval {uuid.uuid4()}"
384385

385386
function_1_schema = {
386-
"name": "call_function",
387+
"name": "call_function_1",
387388
"parameters": {"type": "object", "properties": {}, "required": []},
388389
"description": "This is a test function 1",
389390
}
390391
function_2_schema = {
391-
"name": "call_function",
392+
"name": "call_function_2",
392393
"parameters": {"type": "object", "properties": {}, "required": []},
393394
"description": "This is a test function 2",
394395
}

0 commit comments

Comments
 (0)