pub trait PromptComponent: Send + Sync {
// Required methods
fn id(&self) -> PromptComponentId;
fn build_prompt_section(&self, settings: &Settings) -> Option<String>;
}Expand description
A composable unit that contributes to the system prompt. Implementations provide specific sections of prompt content.
Required Methods§
Sourcefn id(&self) -> PromptComponentId
fn id(&self) -> PromptComponentId
Returns the unique identifier for this component. This ID is used for filtering via PromptComponentSelection.
Sourcefn build_prompt_section(&self, settings: &Settings) -> Option<String>
fn build_prompt_section(&self, settings: &Settings) -> Option<String>
Returns the prompt section content, or None if this component should not contribute to the current prompt.