pub enum Choice {
Auto,
Off,
List(Vec<String>),
}Expand description
Which blocks ride in the prompt: [agent] prompt_blocks.
Three answers and no fourth: a mode that decides per model (auto), a list that decides per name,
and nothing at all. It is one key rather than a boolean per block because the interesting
question is “what is my model being told”, and a list of booleans answers it badly.
Variants§
Auto
Every block whose gate matches the model in force.
Off
No block at all.
List(Vec<String>)
Exactly these, whatever the model.
Implementations§
Source§impl Choice
impl Choice
Sourcepub fn names_for(&self, model: &str) -> Vec<&'static str>
pub fn names_for(&self, model: &str) -> Vec<&'static str>
The names in force for model, in library order.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Choice
prompt_blocks = "auto", "off", or ["task-completion", "parallel-tool-calls"].
impl<'de> Deserialize<'de> for Choice
prompt_blocks = "auto", "off", or ["task-completion", "parallel-tool-calls"].
A name this build does not ship is a parse error rather than a silently ignored entry: a typo in a list would otherwise delete a block while the file looks like it asked for it.
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Choice
impl StructuralPartialEq for Choice
Auto Trait Implementations§
impl Forget for Choice
impl Freeze for Choice
impl Move for Choice
impl RefUnwindSafe for Choice
impl Send for Choicewhere
RawVecInner: Send,
impl Sync for Choicewhere
RawVecInner: Sync,
impl Unpin for Choice
impl UnsafeUnpin for Choice
impl UnwindSafe for Choicewhere
RawVecInner: UnwindSafe,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.