pub struct Role {
pub system_prompt: Option<String>,
pub system_prompt_file: Option<String>,
}Expand description
A reusable role definition that can be referenced by steps.
Roles define system prompts that shape agent behavior. Each role can provide its prompt inline or load it from an external file, enabling maintainable workflows with many distinct personas.
Fields§
§system_prompt: Option<String>Inline system prompt for this role. Supports ${var} references.
system_prompt_file: Option<String>Path to a file containing the system prompt (relative to the .zwf file).
Loaded at execution time. Supports ${var} references in the file content.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Role
impl<'de> Deserialize<'de> for Role
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more