pub struct ProviderToolDefinition {
pub kind: String,
pub config: Map<String, Value>,
}Expand description
Provider-native tool definition.
Stored under additional_params.tools and forwarded by providers that support
provider-managed tools.
Fields§
§kind: StringTool type/kind name as expected by the target provider (for example web_search).
config: Map<String, Value>Additional provider-specific configuration for this hosted tool.
Implementations§
Source§impl ProviderToolDefinition
impl ProviderToolDefinition
Sourcepub fn new(kind: impl Into<String>) -> ProviderToolDefinition
pub fn new(kind: impl Into<String>) -> ProviderToolDefinition
Creates a provider-hosted tool definition by type.
Sourcepub fn with_config(
self,
key: impl Into<String>,
value: Value,
) -> ProviderToolDefinition
pub fn with_config( self, key: impl Into<String>, value: Value, ) -> ProviderToolDefinition
Adds a provider-specific configuration key/value.
Trait Implementations§
Source§impl Clone for ProviderToolDefinition
impl Clone for ProviderToolDefinition
Source§fn clone(&self) -> ProviderToolDefinition
fn clone(&self) -> ProviderToolDefinition
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 ProviderToolDefinition
impl Debug for ProviderToolDefinition
Source§impl<'de> Deserialize<'de> for ProviderToolDefinition
impl<'de> Deserialize<'de> for ProviderToolDefinition
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProviderToolDefinition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProviderToolDefinition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ProviderToolDefinition
impl PartialEq for ProviderToolDefinition
Source§impl Serialize for ProviderToolDefinition
impl Serialize for ProviderToolDefinition
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ProviderToolDefinition
Auto Trait Implementations§
impl Freeze for ProviderToolDefinition
impl RefUnwindSafe for ProviderToolDefinition
impl Send for ProviderToolDefinition
impl Sync for ProviderToolDefinition
impl Unpin for ProviderToolDefinition
impl UnsafeUnpin for ProviderToolDefinition
impl UnwindSafe for ProviderToolDefinition
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
impl<T> DebuggableStorage for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.