pub struct ChatGPT { /* private fields */ }
Implementations§
Source§impl ChatGPT
impl ChatGPT
pub fn new(api_key: String, model: Model) -> Self
pub async fn query_with_retries( &self, text: String, retries: usize, delay: Duration, ) -> Result<String>
pub async fn query(&self, text: String) -> Result<String>
pub async fn translate( &self, entries: Vec<String>, target_language: &str, ) -> Result<Vec<(String, String)>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChatGPT
impl !RefUnwindSafe for ChatGPT
impl Send for ChatGPT
impl Sync for ChatGPT
impl Unpin for ChatGPT
impl !UnwindSafe for ChatGPT
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