pub struct AssertDefinition {
pub name: String,
pub preset: Option<String>,
pub prompt: Option<String>,
pub system: Option<String>,
pub user_template: Option<String>,
pub assert_text: Option<String>,
pub agent: Option<String>,
pub task_template: Option<String>,
}Expand description
Reusable assertion definition referenced by name from assert steps.
Definitions can either reference a built-in preset via preset, supply a
custom LLM prompt, or define a custom preset by providing both
system and user_template. Custom presets support the same template
variables as built-in presets: {url}, {title}, {content},
{expected_text}, {description}.
Fields§
§name: StringUnique name used to reference this definition from steps.
preset: Option<String>Predefined assertion preset name
(e.g. no_error_on_page, text_visible).
prompt: Option<String>Custom LLM prompt for assertion evaluation.
system: Option<String>System prompt for a custom preset.
user_template: Option<String>User template (with {placeholders}) for a custom preset.
assert_text: Option<String>Text that the text_visible preset checks for, or the
{expected_text} placeholder value for custom presets.
agent: Option<String>Agent endpoint to call for this assertion.
task_template: Option<String>Agent task template for this assertion.
Trait Implementations§
Source§impl Clone for AssertDefinition
impl Clone for AssertDefinition
Source§fn clone(&self) -> AssertDefinition
fn clone(&self) -> AssertDefinition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more