TemplateOperations

Deprecated

Use PromptRunner.Rendering instead

Replace with

import com.embabel.agent.api.common.PromptRunner.Rendering
PromptRunner.Rendering

Llm operations based on a compiled template. Similar to com.embabel.agent.api.common.PromptRunnerOperations, but taking a model instead of a template string.

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.