Rendering

interface Rendering

Fluent interface for rendering templates and generating LLM responses. Provides operations for:

  • Creating strongly-typed objects from rendered templates

  • Generating text from rendered templates

  • Responding in conversations with templates as system prompts

Instances are obtained via PromptRunner.rendering.

Inheritors

Functions

Link copied to clipboard
abstract fun <T> createObject(outputClass: Class<T>, model: Map<String, Any>): T

Create an object of the given type using the given model to render the template and LLM options from context.

Link copied to clipboard
Link copied to clipboard
abstract fun generateText(model: Map<String, Any>): String

Generate text using the given model to render the template and LLM options from context.

Link copied to clipboard
abstract fun respondWithSystemPrompt(conversation: Conversation, model: Map<String, Any> = emptyMap()): AssistantMessage

Respond in the conversation using the rendered template as system prompt.