TemplatedPromptRunnerBuilder

data class TemplatedPromptRunnerBuilder(val context: OperationContext, val runner: PromptRunner)

Wrapper builder that renders a loaded template into a system prompt for a PromptRunner, using the platform com.embabel.common.textio.template.TemplateRenderer available from the OperationContext. Keeps template handling out of the PromptRunner sub-interfaces, following the same pattern as com.embabel.agent.api.streaming.StreamingPromptRunnerBuilder.

Constructors

Link copied to clipboard
constructor(context: OperationContext, runner: PromptRunner)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun withSystemPromptTemplate(templateName: String, model: Map<String, Any> = emptyMap()): PromptRunner

Render the named template with the given model and return a runner carrying the rendered text as its system prompt.