Class OpenAITextGenerationService
- java.lang.Object
-
- com.microsoft.semantickernel.aiservices.openai.textcompletion.OpenAITextGenerationService
-
- All Implemented Interfaces:
Buildable,AIService,TextAIService,TextGenerationService
public class OpenAITextGenerationService extends Object implements TextGenerationService
-
-
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()static Map<String,ContextVariable<?>>buildMetadata(String id, com.azure.ai.openai.models.CompletionsUsage usage, OffsetDateTime createdAt)StringgetModelId()StringgetServiceId()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)
-
-
-
Method Detail
-
builder
public static OpenAITextGenerationService.Builder builder()
-
getServiceId
@Nullable public String getServiceId()
- Specified by:
getServiceIdin interfaceAIService
-
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
-
buildMetadata
public static Map<String,ContextVariable<?>> buildMetadata(String id, com.azure.ai.openai.models.CompletionsUsage usage, OffsetDateTime createdAt)
-
getModelId
@Nullable public String getModelId()
- Specified by:
getModelIdin interfaceAIService
-
-