pub struct RegisteredBlock {
pub name: String,
pub role: BlockRole,
pub order: i32,
pub content: PromptContent,
pub cache_strategy: Option<CacheStrategy>,
pub origin: BlockOrigin,
}Expand description
A contribution to the system prompt.
Fields§
§name: StringHow anything else refers to this block. See
crate::prompt::names for the kernel’s.
role: BlockRole§order: i32Ascending. See the module docs.
content: PromptContent§cache_strategy: Option<CacheStrategy>§origin: BlockOriginImplementations§
Source§impl RegisteredBlock
impl RegisteredBlock
Sourcepub fn system(
name: impl Into<String>,
order: i32,
content: impl Into<String>,
) -> Self
pub fn system( name: impl Into<String>, order: i32, content: impl Into<String>, ) -> Self
A static system block at order, from the kernel.
pub fn with_cache(self, strategy: CacheStrategy) -> Self
pub fn from_origin(self, origin: BlockOrigin) -> Self
Trait Implementations§
Source§impl Clone for RegisteredBlock
impl Clone for RegisteredBlock
Auto Trait Implementations§
impl !RefUnwindSafe for RegisteredBlock
impl !UnwindSafe for RegisteredBlock
impl Forget for RegisteredBlock
impl Freeze for RegisteredBlock
impl Move for RegisteredBlock
impl Send for RegisteredBlock
impl Sync for RegisteredBlock
impl Unpin for RegisteredBlock
impl UnsafeUnpin for RegisteredBlock
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