pub struct SystemLayout { /* private fields */ }Expand description
The order the host gives the system prompt’s blocks.
Every block the prompt holds has a slot here; inserting a block whose slot is not laid out is a mistake in the host and panics. aither supplies no block of its own: the prompt holds what the embedder fills. Instructions render first in their listed order, then the external-content notice and the external blocks in theirs.
Implementations§
Source§impl SystemLayout
impl SystemLayout
Sourcepub fn new(
instructions: impl IntoIterator<Item = InstructionSlot>,
external: impl IntoIterator<Item = ExternalSlot>,
) -> Self
pub fn new( instructions: impl IntoIterator<Item = InstructionSlot>, external: impl IntoIterator<Item = ExternalSlot>, ) -> Self
A layout rendering instructions, then external, each in the order
given.
§Panics
Panics if a slot is listed twice in its region.
Sourcepub fn instructions(&self) -> &[InstructionSlot]
pub fn instructions(&self) -> &[InstructionSlot]
The instruction slots in render order.
Sourcepub fn external(&self) -> &[ExternalSlot]
pub fn external(&self) -> &[ExternalSlot]
The external-content slots in render order.
Trait Implementations§
Source§impl Clone for SystemLayout
impl Clone for SystemLayout
Source§impl Debug for SystemLayout
impl Debug for SystemLayout
Source§impl Default for SystemLayout
impl Default for SystemLayout
impl Eq for SystemLayout
Source§impl PartialEq for SystemLayout
impl PartialEq for SystemLayout
impl StructuralPartialEq for SystemLayout
Auto Trait Implementations§
impl Forget for SystemLayout
impl Freeze for SystemLayout
impl Move for SystemLayout
impl RefUnwindSafe for SystemLayout
impl Send for SystemLayout
impl Sync for SystemLayout
impl Unpin for SystemLayout
impl UnsafeUnpin for SystemLayout
impl UnwindSafe for SystemLayout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.