pub struct ToolSpec {
pub name: String,
pub description: String,
pub parameters: Value,
}Fields§
§name: String§description: String§parameters: ValueImplementations§
Source§impl ToolSpec
impl ToolSpec
Sourcepub fn freeform_input_field(&self) -> Option<&'static str>
pub fn freeform_input_field(&self) -> Option<&'static str>
The argument field a raw freeform-channel body maps to, for tools that are best emitted on a provider’s freeform/custom tool channel instead of as a JSON-schema function.
apply_patch is the canonical case: gpt-5.5 was RL-trained to emit
patches on the OpenAI Responses custom-tool channel (type:"custom"),
where the call carries the raw patch text as a string input rather than
JSON arguments. Ordinary function tools return None (the default), so
this is backward-compatible. Providers without a freeform channel ignore
it and always serialize type:"function".
pub fn normalized_for_model(&self, policy: ToolSchemaPolicy) -> Self
pub fn normalized_for_model_profile(&self, policy: ModelSchemaPolicy) -> Self
pub fn discovery_item( &self, provider_id: impl Into<String>, schema_uri: impl Into<String>, ) -> DiscoveryCatalogItem
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolSpec
impl<'de> Deserialize<'de> for ToolSpec
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 StructuralPartialEq for ToolSpec
Auto Trait Implementations§
impl Freeze for ToolSpec
impl RefUnwindSafe for ToolSpec
impl Send for ToolSpec
impl Sync for ToolSpec
impl Unpin for ToolSpec
impl UnsafeUnpin for ToolSpec
impl UnwindSafe for ToolSpec
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