Interface ChatCompletionService
-
- All Superinterfaces:
AIService,TextAIService
public interface ChatCompletionService extends TextAIService
Chat completion service interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classChatCompletionService.BuilderBuilder API for creating aChatCompletionService.
-
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 Abstract Methods Modifier and Type Method Description static ChatCompletionService.Builderbuilder()Get a builder for creating aChatCompletionService.reactor.core.publisher.Mono<List<ChatMessageContent<?>>>getChatMessageContentsAsync(ChatHistory chatHistory, Kernel kernel, InvocationContext invocationContext)Gets the chat message contents asynchronously usingChatHistoryto support a turn-based conversation.reactor.core.publisher.Mono<List<ChatMessageContent<?>>>getChatMessageContentsAsync(String prompt, Kernel kernel, InvocationContext invocationContext)Gets the chat message contents asynchronously using a prompt.-
Methods inherited from interface com.microsoft.semantickernel.services.AIService
getModelId, getServiceId
-
-
-
-
Method Detail
-
builder
static ChatCompletionService.Builder builder()
Get a builder for creating aChatCompletionService. The builder loads a service that implements theChatCompletionService.Builderinterface.- Returns:
- a builder for creating a
ChatCompletionService
-
getChatMessageContentsAsync
reactor.core.publisher.Mono<List<ChatMessageContent<?>>> getChatMessageContentsAsync(ChatHistory chatHistory, @Nullable Kernel kernel, @Nullable InvocationContext invocationContext)
Gets the chat message contents asynchronously usingChatHistoryto support a turn-based conversation. Typically, the resulting chat message contents is appended to thechatHistoryto continue the conversation.- Parameters:
chatHistory- the chat historykernel- the kernelinvocationContext- the invocation context- Returns:
- the chat message contents
-
getChatMessageContentsAsync
reactor.core.publisher.Mono<List<ChatMessageContent<?>>> getChatMessageContentsAsync(String prompt, @Nullable Kernel kernel, @Nullable InvocationContext invocationContext)
Gets the chat message contents asynchronously using a prompt.- Parameters:
prompt- the promptkernel- the kernelinvocationContext- the invocation context- Returns:
- the chat message contents
-
-