Class ToolCallBehavior.AllowedKernelFunctions
- java.lang.Object
-
- com.microsoft.semantickernel.orchestration.ToolCallBehavior
-
- com.microsoft.semantickernel.orchestration.ToolCallBehavior.AllowedKernelFunctions
-
- Enclosing class:
- ToolCallBehavior
public static class ToolCallBehavior.AllowedKernelFunctions extends ToolCallBehavior
A set of allowed kernel functions. All kernel functions are allowed if allKernelFunctionsAllowed is true. Otherwise, only the functions in allowedFunctions are allowed.If a function is allowed, it may be called. If it is not allowed, it will not be called.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microsoft.semantickernel.orchestration.ToolCallBehavior
ToolCallBehavior.AllowedKernelFunctions, ToolCallBehavior.RequiredKernelFunction
-
-
Constructor Summary
Constructors Constructor Description AllowedKernelFunctions(boolean allKernelFunctionsAllowed, boolean autoInvoke, List<KernelFunction<?>> allowedFunctions)Create a new instance of AllowedKernelFunctions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAllKernelFunctionsAllowed()Check whether all kernel functions are allowed.booleanisFunctionAllowed(KernelFunction<?> function)Check whether the given function is allowed.booleanisFunctionAllowed(String pluginName, String functionName)Check whether the given function is allowed.-
Methods inherited from class com.microsoft.semantickernel.orchestration.ToolCallBehavior
allowAllKernelFunctions, allowOnlyKernelFunctions, allowOnlyKernelFunctions, formFullFunctionName, getMaximumAutoInvokeAttempts, isAutoInvokeAllowed, requireKernelFunction
-
-
-
-
Constructor Detail
-
AllowedKernelFunctions
public AllowedKernelFunctions(boolean allKernelFunctionsAllowed, boolean autoInvoke, @Nullable List<KernelFunction<?>> allowedFunctions)Create a new instance of AllowedKernelFunctions.- Parameters:
allKernelFunctionsAllowed- Whether all kernel functions are allowed.autoInvoke- Whether auto-invocation is enabled.allowedFunctions- A set of functions that are allowed.
-
-
Method Detail
-
isFunctionAllowed
public boolean isFunctionAllowed(KernelFunction<?> function)
Check whether the given function is allowed.- Parameters:
function- The function to check.- Returns:
- Whether the function is allowed.
-
isFunctionAllowed
public boolean isFunctionAllowed(@Nullable String pluginName, String functionName)
Check whether the given function is allowed.- Parameters:
pluginName- The name of the skill that the function is in.functionName- The name of the function.- Returns:
- Whether the function is allowed.
-
isAllKernelFunctionsAllowed
public boolean isAllKernelFunctionsAllowed()
Check whether all kernel functions are allowed.- Returns:
- Whether all kernel functions are allowed.
-
-