HandlebarsPromptTemplate Class

  • java.lang.Object
    • com.microsoft.semantickernel.templateengine.handlebars.HandlebarsPromptTemplate

Implements

public class HandlebarsPromptTemplate
implements PromptTemplate

A prompt template that uses the Handlebars template engine to render prompts.

Constructor Summary

Constructor Description
HandlebarsPromptTemplate(PromptTemplateConfig promptTemplate)

Initializes a new instance of the HandlebarsPromptTemplate class.

Method Summary

Modifier and Type Method and Description
reactor.core.publisher.Mono<java.lang.String> renderAsync(Kernel kernel, KernelFunctionArguments arguments, InvocationContext context)

Renders the template using the supplied Kernel, KernelFunctionArguments, and InvocationContext.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

HandlebarsPromptTemplate

public HandlebarsPromptTemplate(PromptTemplateConfig promptTemplate)

Initializes a new instance of the HandlebarsPromptTemplate class.

Parameters:

promptTemplate - The prompt template configuration.

Method Details

renderAsync

public Mono renderAsync(Kernel kernel, KernelFunctionArguments arguments, InvocationContext context)

Renders the template using the supplied Kernel, KernelFunctionArguments, and InvocationContext.

Parameters:

kernel
arguments
context

Applies to