diff --git a/src/GenerativeAI.Microsoft/GenerativeAIChatClient.cs b/src/GenerativeAI.Microsoft/GenerativeAIChatClient.cs
index d76a2dc7..b7482016 100644
--- a/src/GenerativeAI.Microsoft/GenerativeAIChatClient.cs
+++ b/src/GenerativeAI.Microsoft/GenerativeAIChatClient.cs
@@ -44,9 +44,19 @@ public GenerativeAIChatClient(string apiKey, string modelName = GoogleAIModels.D
}
///
- public GenerativeAIChatClient(IPlatformAdapter adapter, string modelName = GoogleAIModels.DefaultGeminiModel)
+ public GenerativeAIChatClient(IPlatformAdapter adapter, string modelName = GoogleAIModels.DefaultGeminiModel, bool autoCallFunction = true)
{
- model = new GenerativeModel(adapter, modelName);
+ model = new GenerativeModel(adapter, modelName)
+ {
+ FunctionCallingBehaviour = new FunctionCallingBehaviour()
+ {
+ FunctionEnabled = true,
+ AutoCallFunction = false,
+ AutoHandleBadFunctionCalls = false,
+ AutoReplyFunction = false
+ }
+ };
+ AutoCallFunction = autoCallFunction;
}
///