Class OpenAITextGenerationService
- java.lang.Object
-
- com.microsoft.semantickernel.aiservices.openai.OpenAiService<com.azure.ai.openai.OpenAIAsyncClient>
-
- com.microsoft.semantickernel.aiservices.openai.textcompletion.OpenAITextGenerationService
-
- All Implemented Interfaces:
AIService,TextAIService,TextGenerationService
public class OpenAITextGenerationService extends OpenAiService<com.azure.ai.openai.OpenAIAsyncClient> implements TextGenerationService
An OpenAI implementation of aTextGenerationService.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOpenAITextGenerationService.BuilderBuilder for a TextGenerationService
-
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 OpenAITextGenerationService.Builderbuilder()Creates a builder for creating aOpenAITextGenerationService.reactor.core.publisher.Flux<StreamingTextContent>getStreamingTextContentsAsync(String prompt, PromptExecutionSettings executionSettings, Kernel kernel)reactor.core.publisher.Mono<List<TextContent>>getTextContentsAsync(String prompt, PromptExecutionSettings executionSettings, Kernel kernel)-
Methods inherited from class com.microsoft.semantickernel.aiservices.openai.OpenAiService
getDeploymentName, getModelId, getServiceId
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microsoft.semantickernel.services.AIService
getModelId, getServiceId
-
-
-
-
Method Detail
-
builder
public static OpenAITextGenerationService.Builder builder()
Creates a builder for creating aOpenAITextGenerationService.- Returns:
- A new
OpenAITextGenerationServicebuilder.
-
getTextContentsAsync
public reactor.core.publisher.Mono<List<TextContent>> getTextContentsAsync(String prompt, @Nullable PromptExecutionSettings executionSettings, @Nullable Kernel kernel)
- Specified by:
getTextContentsAsyncin interfaceTextGenerationService
-
getStreamingTextContentsAsync
public reactor.core.publisher.Flux<StreamingTextContent> getStreamingTextContentsAsync(String prompt, @Nullable PromptExecutionSettings executionSettings, @Nullable Kernel kernel)
- Specified by:
getStreamingTextContentsAsyncin interfaceTextGenerationService
-
-