Skip to main content

TemplateConfig

Defined in the config module.
Rust AI Agent SDK Configuration for prompt templates

Fields

NameTypeDescription
systemOption<String>System template
promptOption<String>Prompt template
responseOption<String>Response template
use_system_promptboolUse system prompt

Methods

new

fn new() -> Self
Create a new template config

system

fn system(mut self, template: impl Into<String>) -> Self
Set system template Parameters:
NameType
templateimpl Into&lt;String&gt;

prompt

fn prompt(mut self, template: impl Into<String>) -> Self
Set prompt template Parameters:
NameType
templateimpl Into&lt;String&gt;

response

fn response(mut self, template: impl Into<String>) -> Self
Set response template Parameters:
NameType
templateimpl Into&lt;String&gt;

no_system_prompt

fn no_system_prompt(mut self) -> Self
Disable system prompt

Source

View on GitHub

praisonai/src/config.rs at line 915