pub struct Prompt { /* private fields */ }Expand description
RubyLLM::Prompt: one named template.
Implementations§
Source§impl Prompt
impl Prompt
Sourcepub fn new(name: impl Into<String>) -> Prompt
pub fn new(name: impl Into<String>) -> Prompt
Prompt.new(name): name without the extension, like "support/instructions".
pub fn with_config(config: Arc<Config>, name: impl Into<String>) -> Prompt
pub fn name(&self) -> &str
Sourcepub fn path(&self) -> PathBuf
pub fn path(&self) -> PathBuf
Prompt#path: the first root that has the file, else where the application root would.
pub fn exists(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Prompt
impl !UnwindSafe for Prompt
impl Freeze for Prompt
impl Send for Prompt
impl Sync for Prompt
impl Unpin for Prompt
impl UnsafeUnpin for Prompt
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