Class ChatCompletionService.Builder
- java.lang.Object
-
- com.microsoft.semantickernel.services.chatcompletion.ChatCompletionService.Builder
-
- All Implemented Interfaces:
SemanticKernelBuilder<ChatCompletionService>
- Enclosing interface:
- ChatCompletionService
public abstract static class ChatCompletionService.Builder extends Object implements SemanticKernelBuilder<ChatCompletionService>
Builder API for creating aChatCompletionService. Concrete implementations ofChatCompletionServicemust implement theSemanticKernelBuilder.build()method.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChatCompletionService.BuilderwithModelId(String modelId)Sets the model ID to use with the ChatCompletion service.ChatCompletionService.BuilderwithOpenAIAsyncClient(com.azure.ai.openai.OpenAIAsyncClient openAIClient)Sets theOpenAIClientto use for communication with the ChatCompletion service.ChatCompletionService.BuilderwithServiceId(String serviceId)Sets the service ID to use with the ChatCompletion service.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microsoft.semantickernel.builders.SemanticKernelBuilder
build
-
-
-
-
Method Detail
-
withModelId
public ChatCompletionService.Builder withModelId(String modelId)
Sets the model ID to use with the ChatCompletion service.- Parameters:
modelId- the model ID to use with the ChatCompletion service- Returns:
- this builder
-
withOpenAIAsyncClient
public ChatCompletionService.Builder withOpenAIAsyncClient(com.azure.ai.openai.OpenAIAsyncClient openAIClient)
Sets theOpenAIClientto use for communication with the ChatCompletion service.- Parameters:
openAIClient- theOpenAIClientto use for communication with the ChatCompletion service- Returns:
- this builder
-
withServiceId
public ChatCompletionService.Builder withServiceId(String serviceId)
Sets the service ID to use with the ChatCompletion service.- Parameters:
serviceId- the service ID to use with the ChatCompletion service- Returns:
- this builder
-
-