pub struct ProviderToolSpec {
pub provider: String,
pub tool_type: String,
pub options: BTreeMap<String, Value>,
}Expand description
A provider-native hosted tool that has no lossless canonical function-tool form.
Adapters only consume entries matching their provider namespace. The options
object contains fields beside the wire-level type, which is owned by
tool_type and cannot be overridden.
Fields§
§provider: StringProvider namespace, such as ark or openai.
tool_type: StringProvider wire-level tool type, such as web_search.
options: BTreeMap<String, Value>Provider-specific tool configuration excluding type.
Implementations§
Source§impl ProviderToolSpec
impl ProviderToolSpec
Sourcepub fn new(
provider: impl Into<String>,
tool_type: impl Into<String>,
) -> Result<Self, ModelError>
pub fn new( provider: impl Into<String>, tool_type: impl Into<String>, ) -> Result<Self, ModelError>
Creates a provider-native tool definition.
§Errors
Returns crate::ModelErrorKind::InvalidRequest for blank or unsafe
provider and tool-type tokens.
Trait Implementations§
Source§impl Clone for ProviderToolSpec
impl Clone for ProviderToolSpec
Source§fn clone(&self) -> ProviderToolSpec
fn clone(&self) -> ProviderToolSpec
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 ProviderToolSpec
impl Debug for ProviderToolSpec
Source§impl<'de> Deserialize<'de> for ProviderToolSpec
impl<'de> Deserialize<'de> for ProviderToolSpec
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
Source§impl PartialEq for ProviderToolSpec
impl PartialEq for ProviderToolSpec
Source§impl Serialize for ProviderToolSpec
impl Serialize for ProviderToolSpec
impl StructuralPartialEq for ProviderToolSpec
Auto Trait Implementations§
impl Freeze for ProviderToolSpec
impl RefUnwindSafe for ProviderToolSpec
impl Send for ProviderToolSpec
impl Sync for ProviderToolSpec
impl Unpin for ProviderToolSpec
impl UnsafeUnpin for ProviderToolSpec
impl UnwindSafe for ProviderToolSpec
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