BaseAIServiceSelector Class
- java.
lang. Object - com.
microsoft. semantickernel. services. BaseAIServiceSelector
- com.
Implements
public abstract class BaseAIServiceSelector
implements AIServiceSelector
Base class for AIServiceSelector implementations which provides a Map based collection from which an AIService can be selected. The trySelectAIService(Class<T> serviceType, KernelFunction<?> function, KernelFunctionArguments arguments) method has been implemented. Child classes must implement the method #trySelectAIService(Class, KernelFunction, KernelFunctionArguments, Map).
Field Summary
| Modifier and Type | Field and Description |
|---|---|
|
protected final
AIService |
services |
Constructor Summary
| Modifier | Constructor | Description |
|---|---|---|
| protected | BaseAIServiceSelector(AIServiceCollection services) |
Initializes a new instance of the BaseAIServiceSelector class. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
AIService |
trySelectAIService(Class<T> serviceType, KernelFunction<?> function, KernelFunctionArguments arguments)
Resolves an AIService and associated and PromptExecutionSettings based on the associated KernelFunction<T> and KernelFunctionArguments. |
|
protected abstract
AIService |
trySelectAIService(Class<T> serviceType, KernelFunction<?> function, KernelFunctionArguments arguments, Map<Class<? extends AIService>,AIService> services)
Resolves an AIService from the |
Methods inherited from java.lang.Object
Field Details
services
protected final AIServiceCollection services
Constructor Details
BaseAIServiceSelector
protected BaseAIServiceSelector(AIServiceCollection services)
Initializes a new instance of the BaseAIServiceSelector class.
Parameters:
Method Details
trySelectAIService
public AIServiceSelection
Resolves an AIService and associated and PromptExecutionSettings based on the associated KernelFunction<T> and KernelFunctionArguments.
Parameters:
trySelectAIService
protected abstract AIServiceSelection
Resolves an AIService from the services argument using the specified function and arguments for selection.
Parameters:
null.
null.
Returns:
null if no service could be selected.