Package com.microsoft.semantickernel
Class KernelConfig.Builder
- java.lang.Object
-
- com.microsoft.semantickernel.KernelConfig.Builder
-
- Enclosing class:
- KernelConfig
public static class KernelConfig.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KernelConfig.BuilderaddChatCompletionService(String serviceId, Function<Kernel,ChatCompletion> serviceFactory)Add to the list a service for chat completion, e.g.KernelConfig.BuilderaddTextCompletionService(String serviceId, Function<Kernel,TextCompletion> serviceFactory)KernelConfig.BuilderaddTextEmbeddingsGenerationService(String serviceId, Function<Kernel,EmbeddingGeneration<String,Float>> serviceFactory)KernelConfigbuild()KernelConfig.BuildersetDefaultTextCompletionService(String serviceId)
-
-
-
Method Detail
-
addTextCompletionService
public KernelConfig.Builder addTextCompletionService(String serviceId, Function<Kernel,TextCompletion> serviceFactory)
-
addTextEmbeddingsGenerationService
public KernelConfig.Builder addTextEmbeddingsGenerationService(String serviceId, Function<Kernel,EmbeddingGeneration<String,Float>> serviceFactory)
-
setDefaultTextCompletionService
public KernelConfig.Builder setDefaultTextCompletionService(String serviceId)
-
addChatCompletionService
public KernelConfig.Builder addChatCompletionService(@Nullable String serviceId, Function<Kernel,ChatCompletion> serviceFactory)
Add to the list a service for chat completion, e.g. OpenAI ChatGPT.- Parameters:
serviceId- Id used to identify the serviceserviceFactory- Function used to instantiate the service object- Returns:
- Current object instance
-
build
public KernelConfig build()
-
-