pub struct Block {
pub text: String,
pub cache_control: Option<CacheControl>,
}Expand description
One block of a system prompt.
Anthropic accepts a system prompt as either a string or a list of
{type: "text", text, cache_control?} blocks. We model the block form
directly; conversion from a plain string is handled by
to_system_blocks and the From impls.
Fields§
§text: StringThe block’s text content.
cache_control: Option<CacheControl>Optional cache_control marker. Some(CacheControl::Ephemeral)
means the block ends a cacheable prefix.
Trait Implementations§
impl Eq for Block
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
impl UnwindSafe for Block
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