A programming framework for agentic AI
[Core] Update documentation for function call compatibility (#1237)
Eric Zhue784f2b9b654
diff --git a/autogen/agentchat/conversable_agent.py b/autogen/agentchat/conversable_agent.pyindex d9b848a8e..1bf64889a 100644--- a/autogen/agentchat/conversable_agent.py+++ b/autogen/agentchat/conversable_agent.py@@ -1718,6 +1718,7 @@ class ConversableAgent(Agent):For Azure OpenAI API, use version 2023-12-01-preview or later.`"function"` style will be deprecated. For earlier version use`"function"` if `"tool"` doesn't work.+ See [Azure OpenAI documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling?tabs=python) for details.Returns:The decorator for registering a function to be used by an agent.@@ -1731,7 +1732,7 @@ class ConversableAgent(Agent):return a + str(b * c)```- For Azure OpenAI versions 2023-10-01-preview and earlier, set `api_style`+ For Azure OpenAI versions prior to 2023-12-01-preview, set `api_style`to `"function"` if `"tool"` doesn't work:```@agent2.register_for_llm(api_style="function")diff --git a/test/agentchat/test_tool_calls.py b/test/agentchat/test_tool_calls.pyindex 46e4fef13..8c7ea47ef 100644--- a/test/agentchat/test_tool_calls.py+++ b/test/agentchat/test_tool_calls.py@@ -77,6 +77,9 @@ def test_eval_math_responses_api_style_function():config_list = autogen.config_list_from_models(KEY_LOC,model_list=["gpt-4-0613", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-16k"],+ filter_dict={+ "api_type": ["azure"],+ },)functions = [{