pub struct ServerToolUseBlockParam {
pub id: String,
pub input: Value,
pub name: String,
pub type: String,
pub cache_control: Option<CacheControlEphemeral>,
}Expand description
Parameters for a server tool use block.
This represents a block that describes the use of a server-side tool by the model.
Fields§
§id: StringThe ID of the server tool use.
input: ValueThe input to the server tool, which can be any JSON value.
name: StringThe name of the server tool, which is always “web_search”.
type: StringThe type, which is always “server_tool_use”.
cache_control: Option<CacheControlEphemeral>Create a cache control breakpoint at this content block.
Implementations§
Source§impl ServerToolUseBlockParam
impl ServerToolUseBlockParam
Sourcepub fn new(id: String, input: Value) -> Self
pub fn new(id: String, input: Value) -> Self
Create a new ServerToolUseBlockParam with the given ID and input.
Sourcepub fn with_cache_control(self, cache_control: CacheControlEphemeral) -> Self
pub fn with_cache_control(self, cache_control: CacheControlEphemeral) -> Self
Add a cache control to this server tool use block.
Trait Implementations§
Source§impl Clone for ServerToolUseBlockParam
impl Clone for ServerToolUseBlockParam
Source§fn clone(&self) -> ServerToolUseBlockParam
fn clone(&self) -> ServerToolUseBlockParam
Returns a copy of the value. Read more
1.0.0 · 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 ServerToolUseBlockParam
impl Debug for ServerToolUseBlockParam
Source§impl<'de> Deserialize<'de> for ServerToolUseBlockParam
impl<'de> Deserialize<'de> for ServerToolUseBlockParam
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 From<ServerToolUseBlockParam> for MessageContentBlock
impl From<ServerToolUseBlockParam> for MessageContentBlock
Source§fn from(param: ServerToolUseBlockParam) -> Self
fn from(param: ServerToolUseBlockParam) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ServerToolUseBlockParam
impl PartialEq for ServerToolUseBlockParam
Source§impl Serialize for ServerToolUseBlockParam
impl Serialize for ServerToolUseBlockParam
impl StructuralPartialEq for ServerToolUseBlockParam
Auto Trait Implementations§
impl Freeze for ServerToolUseBlockParam
impl RefUnwindSafe for ServerToolUseBlockParam
impl Send for ServerToolUseBlockParam
impl Sync for ServerToolUseBlockParam
impl Unpin for ServerToolUseBlockParam
impl UnwindSafe for ServerToolUseBlockParam
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