#[non_exhaustive]pub enum ToolChoice {
Auto,
None,
Required,
Tool(String),
}Expand description
How the model should choose among a prompt’s Prompt::tools: freely,
not at all, mandatorily, or pinned to one named tool (issue #665).
#[non_exhaustive]: the wire protocols have more ways to steer this
(“any tool but this one”, a per-tool probability), and adding one must
not break every caller.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Auto
The model decides whether to call a tool or answer directly.
None
The model must answer without calling a tool.
Required
The model must call some tool, whichever it picks.
Tool(String)
The model must call the tool with this name.
Trait Implementations§
Source§impl Clone for ToolChoice
impl Clone for ToolChoice
Source§impl Debug for ToolChoice
impl Debug for ToolChoice
impl Eq for ToolChoice
Source§impl PartialEq for ToolChoice
impl PartialEq for ToolChoice
impl StructuralPartialEq for ToolChoice
Auto Trait Implementations§
impl Freeze for ToolChoice
impl RefUnwindSafe for ToolChoice
impl Send for ToolChoice
impl Sync for ToolChoice
impl Unpin for ToolChoice
impl UnsafeUnpin for ToolChoice
impl UnwindSafe for ToolChoice
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.