Share via


AIServiceSelector Interface

public interface AIServiceSelector

Represents a selector which will return an AIServiceSelection<T> containing instances of AIService and PromptExecutionSettings from the specified provider based on the model settings.

Method Summary

Modifier and Type Method and Description
abstract AIServiceSelection<T> trySelectAIService(Class<T> serviceType, KernelFunction<?> function, KernelFunctionArguments arguments)

Resolves an AIService and associated and PromptExecutionSettings based on the associated KernelFunction<T> and KernelFunctionArguments.

Method Details

trySelectAIService

public abstract AIServiceSelection trySelectAIService(Class serviceType, KernelFunction function, KernelFunctionArguments arguments)

Resolves an AIService and associated and PromptExecutionSettings based on the associated KernelFunction<T> and KernelFunctionArguments.

Parameters:

serviceType - The type of service to select. This must be the same type with which the service was registered in the AIServiceSelection<T>
function - The KernelFunction to use to select the service, or null.
arguments - The KernelFunctionArguments to use to select the service, or null.

Returns:

An AIServiceSelection containing the selected service and associated PromptExecutionSettings.

Applies to