Interface ChatCompletion<ChatHistoryType extends ChatHistory>
-
- All Superinterfaces:
AIService,Buildable,TextCompletion
public interface ChatCompletion<ChatHistoryType extends ChatHistory> extends AIService, TextCompletion, Buildable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceChatCompletion.Builder<ChatHistoryType extends ChatHistory>
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <ChatHistoryType extends ChatHistory,E extends ChatCompletion<ChatHistoryType>>
ChatCompletion.Builder<ChatHistoryType>builder()ChatHistoryTypecreateNewChat(String instructions)Create a new empty chat instancereactor.core.publisher.Mono<String>generateMessageAsync(ChatHistoryType chat, ChatRequestSettings requestSettings)Generate a new chat messagereactor.core.publisher.Flux<String>generateMessageStream(ChatHistoryType chatHistory, ChatRequestSettings requestSettings)reactor.core.publisher.Flux<com.azure.ai.openai.models.ChatCompletions>getStreamingChatCompletionsAsync(ChatHistoryType chat, ChatRequestSettings requestSettings)-
Methods inherited from interface com.microsoft.semantickernel.textcompletion.TextCompletion
completeAsync, completeStreamAsync, defaultCompletionType
-
-
-
-
Method Detail
-
generateMessageAsync
reactor.core.publisher.Mono<String> generateMessageAsync(ChatHistoryType chat, @Nullable ChatRequestSettings requestSettings)
Generate a new chat message- Parameters:
chat- Chat historyrequestSettings- AI request settings- Returns:
- Generated chat message in string format
-
createNewChat
ChatHistoryType createNewChat(@Nullable String instructions)
Create a new empty chat instance- Parameters:
instructions- Optional chat instructions for the AI service- Returns:
- Chat object
-
generateMessageStream
reactor.core.publisher.Flux<String> generateMessageStream(ChatHistoryType chatHistory, @Nullable ChatRequestSettings requestSettings)
-
getStreamingChatCompletionsAsync
reactor.core.publisher.Flux<com.azure.ai.openai.models.ChatCompletions> getStreamingChatCompletionsAsync(ChatHistoryType chat, ChatRequestSettings requestSettings)
-
builder
static <ChatHistoryType extends ChatHistory,E extends ChatCompletion<ChatHistoryType>> ChatCompletion.Builder<ChatHistoryType> builder()
-
-