pub struct RetrievalTool {
pub knowledge_id: String,
pub prompt_template: Option<String>,
}Expand description
GLM’s retrieval tool: grounds the answer in one of Zhipu’s knowledge
bases.
A zai-gated variant of
RequestTool; the wire shape
is {"type": "retrieval", "retrieval": { ... }}.
Fields§
§knowledge_id: StringThe identifier of the knowledge base to retrieve from. Required by GLM.
prompt_template: Option<String>An optional template controlling how retrieved chunks are prompted.
Trait Implementations§
Source§impl Clone for RetrievalTool
impl Clone for RetrievalTool
Source§impl Debug for RetrievalTool
impl Debug for RetrievalTool
Source§impl<'de> Deserialize<'de> for RetrievalTool
impl<'de> Deserialize<'de> for RetrievalTool
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 RetrievalTool
impl RefUnwindSafe for RetrievalTool
impl Send for RetrievalTool
impl Sync for RetrievalTool
impl Unpin for RetrievalTool
impl UnsafeUnpin for RetrievalTool
impl UnwindSafe for RetrievalTool
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