Class OpenAIChatCompletion
- java.lang.Object
-
- com.microsoft.semantickernel.aiservices.openai.chatcompletion.OpenAIChatCompletion
-
- All Implemented Interfaces:
AIService,ChatCompletionService,TextAIService
public class OpenAIChatCompletion extends Object implements ChatCompletionService
OpenAI chat completion service.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOpenAIChatCompletion.BuilderBuilder for creating a new instance ofOpenAIChatCompletion.
-
Field Summary
-
Fields inherited from interface com.microsoft.semantickernel.services.TextAIService
MAX_RESULTS_PER_PROMPT, MAXIMUM_INFLIGHT_AUTO_INVOKES
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OpenAIChatCompletion.Builderbuilder()Create a new instance ofOpenAIChatCompletion.Builder.reactor.core.publisher.Mono<List<ChatMessageContent<?>>>getChatMessageContentsAsync(ChatHistory chatHistory, Kernel kernel, InvocationContext invocationContext)reactor.core.publisher.Mono<List<ChatMessageContent<?>>>getChatMessageContentsAsync(String prompt, Kernel kernel, InvocationContext invocationContext)StringgetModelId()StringgetServiceId()
-
-
-
Method Detail
-
builder
public static OpenAIChatCompletion.Builder builder()
Create a new instance ofOpenAIChatCompletion.Builder.- Returns:
- a new instance of
OpenAIChatCompletion.Builder
-
getServiceId
@Nullable public String getServiceId()
- Specified by:
getServiceIdin interfaceAIService
-
getChatMessageContentsAsync
public reactor.core.publisher.Mono<List<ChatMessageContent<?>>> getChatMessageContentsAsync(ChatHistory chatHistory, @Nullable Kernel kernel, @Nullable InvocationContext invocationContext)
- Specified by:
getChatMessageContentsAsyncin interfaceChatCompletionService
-
getChatMessageContentsAsync
public reactor.core.publisher.Mono<List<ChatMessageContent<?>>> getChatMessageContentsAsync(String prompt, @Nullable Kernel kernel, @Nullable InvocationContext invocationContext)
- Specified by:
getChatMessageContentsAsyncin interfaceChatCompletionService
-
getModelId
@Nullable public String getModelId()
- Specified by:
getModelIdin interfaceAIService
-
-