pub enum RequestTool {
Function {
function: ToolFunction,
},
Custom {
custom: ToolCustom,
},
Retrieval {
retrieval: RetrievalTool,
},
WebSearch {
web_search: WebSearchTool,
},
}Variants§
Function
The type of the tool. Currently, only function is supported.
Fields
§
function: ToolFunctionCustom
The type of the custom tool. Always custom.
Fields
§
custom: ToolCustomProperties of the custom tool.
Retrieval
Z.ai / GLM: the retrieval tool, grounding the answer in one of
Zhipu’s knowledge bases. Always retrieval.
Fields
§
retrieval: RetrievalToolProperties of the retrieval tool.
WebSearch
Z.ai / GLM: the web_search tool, letting the model call Zhipu’s web
search. Always web_search.
Fields
§
web_search: WebSearchToolProperties of the web-search tool.
Trait Implementations§
Source§impl Clone for RequestTool
impl Clone for RequestTool
Source§impl Debug for RequestTool
impl Debug for RequestTool
Source§impl<'de> Deserialize<'de> for RequestTool
impl<'de> Deserialize<'de> for RequestTool
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
Auto Trait Implementations§
impl Freeze for RequestTool
impl RefUnwindSafe for RequestTool
impl Send for RequestTool
impl Sync for RequestTool
impl Unpin for RequestTool
impl UnsafeUnpin for RequestTool
impl UnwindSafe for RequestTool
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