Template Operations
Deprecated
Use PromptRunner.Rendering instead
Replace with
import com.embabel.agent.api.common.PromptRunner.Rendering
PromptRunner.RenderingLlm operations based on a compiled template. Similar to com.embabel.agent.api.common.PromptRunnerOperations, but taking a model instead of a template string.
Functions
Generate text using the given model to render the template and LLM options from context.
Safely respond to the user in the conversation using the rendered template as system prompt, returning an error message if something goes wrong. Cannot throw an exception.
Respond in the conversation using the rendered template as system prompt.
Respond to a system-initiated trigger using the rendered template as system prompt. The trigger prompt is appended as a user message to the LLM call but not stored in the conversation.
Set the template renderer to use for rendering templates in this mode. By default, this Renderer will use the platform's default TemplateRenderer, but this allows for custom renderers to be used on a per-rendering basis.