pub struct Chat<T> { /* private fields */ }
Expand description
Simplest way to use gemini-rs, and covers 80% of use cases
Implementations§
Source§impl<T> Chat<T>
impl<T> Chat<T>
pub fn new(client: &Client, model: &str) -> Self
pub fn config(&mut self) -> &GenerationConfig
pub fn to_json(self) -> Chat<Json>
pub fn config_mut(&mut self) -> &mut GenerationConfig
pub fn history(&self) -> &[Content]
pub fn history_mut(&mut self) -> &mut Vec<Content>
pub fn safety_settings(&mut self, safety_settings: Vec<SafetySettings>)
pub fn system_instruction(self, instruction: &str) -> Self
pub async fn generate_content(&mut self) -> Result<Response>
pub async fn send_message(&mut self, message: &str) -> Result<Response>
Auto Trait Implementations§
impl<T> Freeze for Chat<T>
impl<T> !RefUnwindSafe for Chat<T>
impl<T> Send for Chat<T>where
T: Send,
impl<T> Sync for Chat<T>where
T: Sync,
impl<T> Unpin for Chat<T>where
T: Unpin,
impl<T> !UnwindSafe for Chat<T>
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