pub struct PromptStore { /* private fields */ }Expand description
Stores prompts with support for file-based overrides
Implementations§
Source§impl PromptStore
impl PromptStore
Sourcepub fn new() -> PromptStore
pub fn new() -> PromptStore
Create a new PromptStore with only embedded defaults
Sourcepub fn with_overrides_dir(self, dir: &Path) -> Result<PromptStore, LoaderError>
pub fn with_overrides_dir(self, dir: &Path) -> Result<PromptStore, LoaderError>
Load overrides from a directory
Directory structure:
prompts/
├── base.txt
├── verification.txt
├── providers/
│ ├── anthropic.txt
│ ├── openai.txt
│ └── gemini.txt
└── tools/
├── bash.txt
├── read_file.txt
└── ...Sourcepub fn verification(&self) -> &str
pub fn verification(&self) -> &str
Get the verification instructions
Sourcepub fn provider(&self, family: ProviderFamily) -> &str
pub fn provider(&self, family: ProviderFamily) -> &str
Get provider-specific prompt
Sourcepub fn tool_names(&self) -> Vec<&str>
pub fn tool_names(&self) -> Vec<&str>
Get all available tool names
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Check if using embedded defaults only (no overrides)
Trait Implementations§
Source§impl Clone for PromptStore
impl Clone for PromptStore
Source§fn clone(&self) -> PromptStore
fn clone(&self) -> PromptStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PromptStore
impl Debug for PromptStore
Source§impl Default for PromptStore
impl Default for PromptStore
Source§fn default() -> PromptStore
fn default() -> PromptStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PromptStore
impl RefUnwindSafe for PromptStore
impl Send for PromptStore
impl Sync for PromptStore
impl Unpin for PromptStore
impl UnsafeUnpin for PromptStore
impl UnwindSafe for PromptStore
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