pub struct CompletionRequirement {
pub tool: String,
pub reminder: String,
pub max_retries: u32,
}Expand description
Require a tool call before the turn may complete.
Enforced by [machi_runtime::TurnRuntime] via stop gates: when the model
returns a final message without having called tool, a reminder is injected
and sampling continues (up to max_retries).
Fields§
§tool: StringCanonical tool name that must be called.
reminder: StringReminder injected when the model stops without calling it.
max_retries: u32Max forced re-samples.
Trait Implementations§
Source§impl Clone for CompletionRequirement
impl Clone for CompletionRequirement
Source§fn clone(&self) -> CompletionRequirement
fn clone(&self) -> CompletionRequirement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompletionRequirement
impl Debug for CompletionRequirement
Source§impl<'de> Deserialize<'de> for CompletionRequirement
impl<'de> Deserialize<'de> for CompletionRequirement
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CompletionRequirement, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CompletionRequirement, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CompletionRequirement
impl Serialize for CompletionRequirement
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CompletionRequirement
impl RefUnwindSafe for CompletionRequirement
impl Send for CompletionRequirement
impl Sync for CompletionRequirement
impl Unpin for CompletionRequirement
impl UnsafeUnpin for CompletionRequirement
impl UnwindSafe for CompletionRequirement
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