Skip to main content

SystemPromptStrategy

Trait SystemPromptStrategy 

Source
pub trait SystemPromptStrategy: Send + Sync {
    // Required method
    fn block_defs(&self) -> &[PromptBlockDef];
}
Expand description

Defines the structure template for a system prompt.

A strategy is reusable — multiple SystemPrompt instances can share one strategy, each providing different content for the same block structure.

Required Methods§

Source

fn block_defs(&self) -> &[PromptBlockDef]

Return block definitions (structure only, no content).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§