Share via


PromptTemplate Interface

public interface PromptTemplate

Represents a prompt template that can be rendered to a string.

Method Summary

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

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

Method Details

renderAsync

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

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

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.

Applies to