pub struct Settings { /* private fields */ }
Implementations§
Source§impl Settings
impl Settings
pub fn new() -> Self
pub fn set_stream_max_json_size(&mut self, size: u32)
pub fn set_all_safety_settings(&mut self, threshold: HarmBlockThreshold)
pub fn set_advance_settings( &mut self, stop_sequences: Option<Vec<String>>, response_mime_type: Option<String>, max_output_tokens: Option<u32>, temperature: Option<f32>, top_p: Option<f32>, top_k: Option<u32>, thinking_budget: Option<u32>, )
pub fn set_temperature(&mut self, temperature: f32)
pub fn set_max_output_tokens(&mut self, max_output_tokens: u32)
Sourcepub fn set_thinking_budget(&mut self, thinking_budget: u32)
pub fn set_thinking_budget(&mut self, thinking_budget: u32)
Set the thinking budget for the generation config. By default, the thinking budget is None, which means the model will decide whether to think or not. Best to not use this, and let the model decide.
pub fn set_system_instruction(&mut self, instruction: &str)
pub fn get_stream_max_json_size(&self) -> u32
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
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