pub struct PromptManager { /* private fields */ }Expand description
提示词管理器实现
Implementations§
Source§impl PromptManager
impl PromptManager
pub fn new() -> Self
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
创建带有默认模板的管理器
Trait Implementations§
Source§impl Default for PromptManager
impl Default for PromptManager
Source§impl PromptManagerTrait for PromptManager
impl PromptManagerTrait for PromptManager
Source§fn register(&self, template: PromptTemplate) -> Layer2Result<()>
fn register(&self, template: PromptTemplate) -> Layer2Result<()>
注册模板
Source§fn unregister(&self, name: &str) -> Layer2Result<bool>
fn unregister(&self, name: &str) -> Layer2Result<bool>
注销模板
Auto Trait Implementations§
impl !Freeze for PromptManager
impl !RefUnwindSafe for PromptManager
impl Send for PromptManager
impl Sync for PromptManager
impl Unpin for PromptManager
impl UnsafeUnpin for PromptManager
impl UnwindSafe for PromptManager
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