You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Gets an instance of the FunctionChoiceBehavior that provides either all the Kernel's plugins functions to the AI model to call or specific functions.
71
+
*
72
+
* @param autoInvoke Enable or disable auto-invocation.
73
+
* If auto-invocation is enabled, the model may request that the Semantic Kernel
74
+
* invoke the kernel functions and return the value to the model.
75
+
* @param functions Functions to provide to the model. If null, all the Kernel's plugins' functions are provided to the model.
76
+
* If empty, no functions are provided to the model, which is equivalent to disabling function calling.
77
+
*
78
+
* @return A new FunctionChoiceBehavior instance with all kernel functions allowed.
* Gets an instance of the FunctionChoiceBehavior that provides either all the Kernel's plugins functions to the AI model to call or specific functions.
71
87
*
@@ -79,11 +95,25 @@ public static FunctionChoiceBehavior auto(boolean autoInvoke) {
79
95
* @return A new FunctionChoiceBehavior instance with all kernel functions allowed.
* Gets an instance of the FunctionChoiceBehavior that provides either all the Kernel's plugins functions to the AI model to call or specific functions.
105
+
* <p>
106
+
* This behavior forces the model to call the provided functions.
107
+
* SK connectors will invoke a requested function or multiple requested functions if the model requests multiple ones in one request,
108
+
* while handling the first request, and stop advertising the functions for the following requests to prevent the model from repeatedly calling the same function(s).
109
+
*
110
+
* @return A new FunctionChoiceBehavior instance with the required function.
* Gets an instance of the FunctionChoiceBehavior that provides either all the Kernel's plugins functions to the AI model to call or specific functions.
89
119
* <p>
@@ -96,11 +126,20 @@ public static FunctionChoiceBehavior auto(boolean autoInvoke,
96
126
* @return A new FunctionChoiceBehavior instance with the required function.
* Gets an instance of the FunctionChoiceBehavior that provides either all the Kernel's plugins functions to the AI model to call or specific functions.
136
+
* <p>
137
+
* This behavior is useful if the user should first validate what functions the model will use.
138
+
*/
139
+
publicstaticFunctionChoiceBehaviornone() {
140
+
returnnewNoneFunctionChoiceBehavior(null, null);
141
+
}
142
+
104
143
/**
105
144
* Gets an instance of the FunctionChoiceBehavior that provides either all the Kernel's plugins functions to the AI model to call or specific functions.
106
145
* <p>
@@ -109,7 +148,7 @@ public static FunctionChoiceBehavior required(boolean autoInvoke,
109
148
* @param functions Functions to provide to the model. If null, all the Kernel's plugins' functions are provided to the model.
110
149
* If empty, no functions are provided to the model, which is equivalent to disabling function calling.
Copy file name to clipboardExpand all lines: semantickernel-api/src/main/java/com/microsoft/semantickernel/functionchoice/NoneFunctionChoiceBehavior.java
Copy file name to clipboardExpand all lines: semantickernel-api/src/main/java/com/microsoft/semantickernel/functionchoice/RequiredFunctionChoiceBehavior.java
0 commit comments