Interface ChatCompletionService
-
- All Superinterfaces:
AIService,TextAIService
public interface ChatCompletionService extends TextAIService
Chat completion service interface.
-
-
Field Summary
-
Fields inherited from interface com.microsoft.semantickernel.services.TextAIService
MAX_RESULTS_PER_PROMPT, MAXIMUM_INFLIGHT_AUTO_INVOKES
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.reactor.core.publisher.Flux<StreamingChatContent<?>>getStreamingChatMessageContentsAsync(ChatHistory chatHistory, Kernel kernel, InvocationContext invocationContext)Gets the chat message contents asynchronously usingChatHistoryto support a turn-based conversation.reactor.core.publisher.Flux<StreamingChatContent<?>>getStreamingChatMessageContentsAsync(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
-
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
-
getStreamingChatMessageContentsAsync
reactor.core.publisher.Flux<StreamingChatContent<?>> getStreamingChatMessageContentsAsync(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
-
getStreamingChatMessageContentsAsync
reactor.core.publisher.Flux<StreamingChatContent<?>> getStreamingChatMessageContentsAsync(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
-
-