Template Config • Rust AI Agent SDK
TemplateConfig: Configuration for prompt templates
TemplateConfig
Defined in the config module.
Rust AI Agent SDK
Configuration for prompt templates
Fields
| Name | Type | Description |
|---|---|---|
system | Option<String> | System template |
prompt | Option<String> | Prompt template |
response | Option<String> | Response template |
use_system_prompt | bool | Use system prompt |
Methods
new
fn new() -> SelfCreate a new template config
system
fn system(mut self, template: impl Into<String>) -> SelfSet system template
Parameters:
| Name | Type |
|---|---|
template | impl Into<String> |
prompt
fn prompt(mut self, template: impl Into<String>) -> SelfSet prompt template
Parameters:
| Name | Type |
|---|---|
template | impl Into<String> |
response
fn response(mut self, template: impl Into<String>) -> SelfSet response template
Parameters:
| Name | Type |
|---|---|
template | impl Into<String> |
no_system_prompt
fn no_system_prompt(mut self) -> SelfDisable system prompt
Source
View on GitHubpraisonai/src/config.rs at line 915