#[non_exhaustive]pub struct ToolConfig {
pub function_calling_config: Option<FunctionCallingConfig>,
pub retrieval_config: Option<RetrievalConfig>,
/* private fields */
}Available on crate features
gen-ai-cache-service or prediction-service only.Expand description
Tool config. This config is shared for all tools provided in the request.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.function_calling_config: Option<FunctionCallingConfig>Optional. Function calling config.
retrieval_config: Option<RetrievalConfig>Optional. Retrieval config.
Implementations§
Source§impl ToolConfig
impl ToolConfig
pub fn new() -> Self
Sourcepub fn set_function_calling_config<T>(self, v: T) -> Selfwhere
T: Into<FunctionCallingConfig>,
pub fn set_function_calling_config<T>(self, v: T) -> Selfwhere
T: Into<FunctionCallingConfig>,
Sets the value of function_calling_config.
Sourcepub fn set_or_clear_function_calling_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<FunctionCallingConfig>,
pub fn set_or_clear_function_calling_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<FunctionCallingConfig>,
Sets or clears the value of function_calling_config.
Sourcepub fn set_retrieval_config<T>(self, v: T) -> Selfwhere
T: Into<RetrievalConfig>,
pub fn set_retrieval_config<T>(self, v: T) -> Selfwhere
T: Into<RetrievalConfig>,
Sets the value of retrieval_config.
Sourcepub fn set_or_clear_retrieval_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RetrievalConfig>,
pub fn set_or_clear_retrieval_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RetrievalConfig>,
Sets or clears the value of retrieval_config.
Trait Implementations§
Source§impl Clone for ToolConfig
impl Clone for ToolConfig
Source§fn clone(&self) -> ToolConfig
fn clone(&self) -> ToolConfig
Returns a duplicate 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 ToolConfig
impl Debug for ToolConfig
Source§impl Default for ToolConfig
impl Default for ToolConfig
Source§fn default() -> ToolConfig
fn default() -> ToolConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for ToolConfig
impl PartialEq for ToolConfig
impl StructuralPartialEq for ToolConfig
Auto Trait Implementations§
impl Freeze for ToolConfig
impl RefUnwindSafe for ToolConfig
impl Send for ToolConfig
impl Sync for ToolConfig
impl Unpin for ToolConfig
impl UnwindSafe for ToolConfig
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