Class HandlebarsPromptTemplate

  • All Implemented Interfaces:
    PromptTemplate

    public class HandlebarsPromptTemplate
    extends Object
    implements PromptTemplate
    A prompt template that uses the Handlebars template engine to render prompts.
    • Method Detail

      • renderAsync

        public reactor.core.publisher.Mono<String> renderAsync​(Kernel kernel,
                                                               @Nullable
                                                               KernelFunctionArguments arguments,
                                                               @Nullable
                                                               InvocationContext context)
        Description copied from interface: PromptTemplate
        Renders the template using the supplied Kernel, KernelFunctionArguments, and InvocationContext.
        Specified by:
        renderAsync in interface PromptTemplate
        Parameters:
        kernel - The Kernel containing services, plugins, and other state for use throughout the operation.
        arguments - The arguments to use to satisfy any input variables in the prompt template.
        context - The InvocationContext which carries optional information for the prompt rendering.
        Returns:
        The rendered prompt.