TemplateOperations

class TemplateOperations(templateName: String, templateRenderer: <Error class: unknown class>, promptRunnerOperations: PromptRunnerOperations)

Llm operations based on a compiled template. Similar to PromptRunnerOperations, but taking a model instead of a template string. Template names will be resolved by the TemplateRenderer provided.

Constructors

Link copied to clipboard
constructor(templateName: String, templateRenderer: <Error class: unknown class>, promptRunnerOperations: PromptRunnerOperations)

Functions

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

Respond in the conversation using the template as system prompt.