Interface TextGenerationService

    • Method Detail

      • getTextContentsAsync

        reactor.core.publisher.Mono<List<TextContent>> getTextContentsAsync​(String prompt,
                                                                            @Nullable
                                                                            PromptExecutionSettings executionSettings,
                                                                            @Nullable
                                                                            Kernel kernel)
        Creates a completion for the prompt and settings.
        Parameters:
        prompt - The prompt to complete.
        executionSettings - Request settings for the completion API
        kernel - The Kernel containing services, plugins, and other state for use throughout the operation.
        Returns:
        Text generated by the remote model
      • getStreamingTextContentsAsync

        reactor.core.publisher.Flux<StreamingTextContent> getStreamingTextContentsAsync​(String prompt,
                                                                                        @Nullable
                                                                                        PromptExecutionSettings executionSettings,
                                                                                        @Nullable
                                                                                        Kernel kernel)
        Get streaming results for the prompt using the specified execution settings. Each modality may support for different types of streaming contents.
        Parameters:
        prompt - The prompt to complete.
        executionSettings - The AI execution settings (optional).
        kernel - The Kernel containing services, plugins, and other state for use throughout the operation.
        Returns:
        Streaming list of different completion streaming string updates generated by the remote model