pub struct ModelToolCapabilities { /* private fields */ }Expand description
Model support for tool definitions, selection, and emitted calls.
The schema profile identifies a trusted, digest-pinned document describing
the provider subset accepted for tool input schemas. It is not fetched from
the network at invocation time. Strict arguments guarantee provider-side
schema-constrained generation only for complete tool-call items; StateKnot
still validates every decoded argument locally.
Implementations§
Source§impl ModelToolCapabilities
impl ModelToolCapabilities
Sourcepub fn new(
schema_profile: Option<SchemaReference>,
max_definitions: ExecutionCount,
max_calls_per_response: ExecutionCount,
choices: ModelToolChoices,
strict_arguments: bool,
) -> Result<Self, ModelToolCapabilitiesError>
pub fn new( schema_profile: Option<SchemaReference>, max_definitions: ExecutionCount, max_calls_per_response: ExecutionCount, choices: ModelToolChoices, strict_arguments: bool, ) -> Result<Self, ModelToolCapabilitiesError>
Constructs and cross-validates tool-call capabilities.
Absence of a schema profile represents unsupported tool calling and requires every other tool field to be empty, zero, or false.
§Errors
Returns ModelToolCapabilitiesError for an incoherent unsupported
state, zero supported capacity, or missing automatic selection.
Sourcepub fn unsupported() -> Self
pub fn unsupported() -> Self
Constructs an unsupported tool-call capability.
Sourcepub const fn supports_tool_calling(&self) -> bool
pub const fn supports_tool_calling(&self) -> bool
Returns whether this model binding accepts tool definitions.
Sourcepub const fn schema_profile(&self) -> Option<&SchemaReference>
pub const fn schema_profile(&self) -> Option<&SchemaReference>
Returns the accepted tool-schema profile when tool calling is supported.
Sourcepub const fn max_definitions(&self) -> ExecutionCount
pub const fn max_definitions(&self) -> ExecutionCount
Returns the maximum tool definitions accepted in one request.
Sourcepub const fn max_calls_per_response(&self) -> ExecutionCount
pub const fn max_calls_per_response(&self) -> ExecutionCount
Returns the maximum tool calls emitted in one response.
Sourcepub const fn supports_parallel_calls(&self) -> bool
pub const fn supports_parallel_calls(&self) -> bool
Returns whether more than one tool call may appear in one response.
Sourcepub const fn choices(&self) -> &ModelToolChoices
pub const fn choices(&self) -> &ModelToolChoices
Returns supported tool-selection controls.
Sourcepub const fn supports_strict_arguments(&self) -> bool
pub const fn supports_strict_arguments(&self) -> bool
Returns whether complete tool arguments are provider-constrained to schema.
Trait Implementations§
Source§impl Clone for ModelToolCapabilities
impl Clone for ModelToolCapabilities
Source§impl Debug for ModelToolCapabilities
impl Debug for ModelToolCapabilities
Source§impl<'de> Deserialize<'de> for ModelToolCapabilities
impl<'de> Deserialize<'de> for ModelToolCapabilities
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>,
impl Eq for ModelToolCapabilities
Source§impl JsonSchema for ModelToolCapabilities
impl JsonSchema for ModelToolCapabilities
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more