Skip to main content

SystemPromptConfig

Struct SystemPromptConfig 

Source
pub struct SystemPromptConfig {
    pub system_prompt_files: Vec<String>,
    pub append_prompt_file: Option<String>,
}
Expand description

Configuration for system prompt loading

This structure determines how system prompts are loaded and combined. It supports two modes:

  1. Complete replacement with one or more prompt files
  2. Appending additional content to the default prompt

§Examples

use claude_dialog::prompt::SystemPromptConfig;

// Configuration for multiple system prompts
let config = SystemPromptConfig {
    system_prompt_files: vec!["base.md".to_string(), "custom.md".to_string()],
    append_prompt_file: None,
};

// Configuration for appending to default prompt
let config = SystemPromptConfig {
    system_prompt_files: vec![],
    append_prompt_file: Some("additions.md".to_string()),
};

Fields§

§system_prompt_files: Vec<String>

List of system prompt files to load (replaces default prompt)

When provided, these files completely replace the default system prompt. Multiple files are concatenated with double newlines between them.

§append_prompt_file: Option<String>

Optional file to append to the default prompt

When provided (and system_prompt_files is empty), this file’s contents are appended to the default system prompt rather than replacing it.

Trait Implementations§

Source§

impl Debug for SystemPromptConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.