pub enum ModelToolSelection {
None {},
Auto {},
Required {},
Specific {
name: CapabilityName,
},
}Expand description
Tool-selection behavior for one model request.
Variants§
None
No tool call may be emitted. Definitions may be retained for history.
Auto
The model decides whether and which supplied tool to call.
Required
At least one of the supplied tools must be called.
Specific
One exact supplied tool must be called.
Fields
§
name: CapabilityNameRegistry-local tool name exposed to the model.
Implementations§
Source§impl ModelToolSelection
impl ModelToolSelection
Sourcepub const fn specific(name: CapabilityName) -> Self
pub const fn specific(name: CapabilityName) -> Self
Constructs selection of one named tool.
Sourcepub const fn choice(&self) -> ModelToolChoice
pub const fn choice(&self) -> ModelToolChoice
Returns the capability-negotiation choice class.
Sourcepub const fn specific_name(&self) -> Option<&CapabilityName>
pub const fn specific_name(&self) -> Option<&CapabilityName>
Returns the selected name for specific selection.
Trait Implementations§
Source§impl Clone for ModelToolSelection
impl Clone for ModelToolSelection
Source§impl Debug for ModelToolSelection
impl Debug for ModelToolSelection
Source§impl<'de> Deserialize<'de> for ModelToolSelection
impl<'de> Deserialize<'de> for ModelToolSelection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ModelToolSelection
Source§impl JsonSchema for ModelToolSelection
impl JsonSchema for ModelToolSelection
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ModelToolSelection
impl PartialEq for ModelToolSelection
Source§impl Serialize for ModelToolSelection
impl Serialize for ModelToolSelection
impl StructuralPartialEq for ModelToolSelection
Auto Trait Implementations§
impl Forget for ModelToolSelection
impl Freeze for ModelToolSelection
impl Move for ModelToolSelection
impl RefUnwindSafe for ModelToolSelection
impl Send for ModelToolSelection
impl Sync for ModelToolSelection
impl Unpin for ModelToolSelection
impl UnsafeUnpin for ModelToolSelection
impl UnwindSafe for ModelToolSelection
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