Class BaseAIServiceSelector
- java.lang.Object
-
- com.microsoft.semantickernel.services.BaseAIServiceSelector
-
- All Implemented Interfaces:
AIServiceSelector
- Direct Known Subclasses:
OrderedAIServiceSelector
public abstract class BaseAIServiceSelector extends Object implements AIServiceSelector
Base class forAIServiceSelectorimplementations which provides aMapbased collection from which anAIServicecan be selected. ThetrySelectAIService(Class, KernelFunction, KernelFunctionArguments)method has been implemented. Child classes must implement the methodtrySelectAIService(Class, KernelFunction, KernelFunctionArguments, Map).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends AIService>
AIServiceSelection<T>trySelectAIService(Class<T> serviceType, KernelFunction<?> function, KernelFunctionArguments arguments)Resolves anAIServiceand associated andPromptExecutionSettingsbased on the associatedKernelFunctionandKernelFunctionArguments.
-
-
-
Method Detail
-
trySelectAIService
@Nullable public <T extends AIService> AIServiceSelection<T> trySelectAIService(Class<T> serviceType, @Nullable KernelFunction<?> function, @Nullable KernelFunctionArguments arguments)
Description copied from interface:AIServiceSelectorResolves anAIServiceand associated andPromptExecutionSettingsbased on the associatedKernelFunctionandKernelFunctionArguments.- Specified by:
trySelectAIServicein interfaceAIServiceSelector- Type Parameters:
T- The type of service to select.- Parameters:
serviceType- The type of service to select. This must be the same type with which the service was registered in theAIServiceSelectionfunction- The KernelFunction to use to select the service, ornull.arguments- The KernelFunctionArguments to use to select the service, ornull.- Returns:
- An
AIServiceSelectioncontaining the selected service and associated PromptExecutionSettings.
-
-